Cocoa SEL type

in macOS 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
    kickahakickaha Posts: 8,760member
    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.
Sign In or Register to comment.