Cocoa SEL type
January 8, 2003 8:08PM
edited January 2014
What is it? I'm trying to use sheets, and my book (Learning Cocoa with Obj. C) shows me how to use it. I remeber reading about it earlier, but I dont understand what it does/what it's for. Can any of you explain this to me?
Reply 1 of 1
January 8, 2003 8:23PM
SEL is short for SELector.
It's how methods are bound, using messaging.
To call the foo method of the object bar, you say [bar foo]. This sends a SEL data structure to the object bar that contains the name of the method 'foo'. bar looks at itself, determines if there's a method called that, and if so, calls it. If not, error.