Re: Using @selector()

2008-08-11 Thread Negm-Awad Amin
Am Sa,09.08.2008 um 11:23 schrieb Christian Giordano: yep, it works with that :) I presume it is an error in the book. Personally I thought that passing the method not as string it would have recognized the scope (target) automatically. Fortunaly they don't. Selector-dispatching is performed

Using @selector()

2008-08-09 Thread Christian Giordano
Hi guys, I'm a newbie and I'm reading a book which shows the two different option to link programmatically a control to an action: SEL mySelector; mySelector = @selector(methodName:); [myButton setAction:mySelector]; OR SEL mySelector; mySelector = NSSelectorFromString(@methodName:); [myButton

Re: Using @selector()

2008-08-09 Thread Jean-Daniel Dupas
Le 9 août 08 à 10:34, Christian Giordano a écrit : Hi guys, I'm a newbie and I'm reading a book which shows the two different option to link programmatically a control to an action: SEL mySelector; mySelector = @selector(methodName:); [myButton setAction:mySelector]; OR SEL mySelector;

Re: Using @selector()

2008-08-09 Thread Christian Giordano
yep, it works with that :) I presume it is an error in the book. Personally I thought that passing the method not as string it would have recognized the scope (target) automatically. Thanks a lot, chr On Sat, Aug 9, 2008 at 9:45 AM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Le 9 août 08 à

Re: Using @selector()

2008-08-09 Thread Uli Kusterer
On 09.08.2008, at 11:23, Christian Giordano wrote: yep, it works with that :) I presume it is an error in the book. Probably. Or they hooked up the target in IB before that. Personally I thought that passing the method not as string it would have recognized the scope (target)