Re: adding a delegate to a class

2008-06-10 Thread Erik Buck
See http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_4.html ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: adding a delegate to a class

2008-06-10 Thread Jesse Armand
Hello Angelo, I think this code might help you: @protocol BackgroundObjDelegate @optional - (void)showText:(NSString*)text; @end @interface BackgroundObj : NSObject { id _delegate; } @property(assign) id delegate - (void) sayHi; @end @implementation BackgroundObj @synthesize deleg

RE: adding a delegate to a class

2008-06-10 Thread john darnell
esday, June 10, 2008 8:11 AM > To: cocoa-dev@lists.apple.com > Subject: adding a delegate to a class > > Hi, > > I have a code like this: > > @interface BackgroundObj : NSObject > { > Controller *mc; > } > > - (void) sayHi; > > > @imple

adding a delegate to a class

2008-06-10 Thread Angelo Chen
Hi, I have a code like this: @interface BackgroundObj : NSObject { Controller *mc; } - (void) sayHi; @implementation BackgroundObj - (void) sayHi { [mc showText:@"Hi"]; } @end As you can see, the code is hard coded to use class Controller, can not be used with any other obje