• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: adding a delegate to a class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: adding a delegate to a class


  • Subject: RE: adding a delegate to a class
  • From: "john darnell" <email@hidden>
  • Date: Tue, 10 Jun 2008 08:43:16 -0500
  • Thread-topic: adding a delegate to a class

Without knowing what exactly you are trying to achieve, it's hard to advise you, Angelo.  Would a simple printf or one of its variants do for you?

R,
John

> -----Original Message-----
> From: cocoa-dev-bounces+john.darnell=email@hidden
> [mailto:cocoa-dev-bounces+john.darnell=email@hidden] On
> Behalf Of Angelo Chen
> Sent: Tuesday, June 10, 2008 8:11 AM
> To: email@hidden
> Subject: adding a delegate to a class
>
> 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 object, I'd like to add a delegate which will have a
> showText method, sayHi method will just call the delegate instead of hard
> coded Controller, any idea how to add delegates to this object? or, any
> tutorials for this? Thanks,
>
> Angelo
>
>
>
>
>       Yahoo! Mail具備一流的網上安全保護功能,請前往 http://hk.antispam.yahoo.com/ 了解更多相關資訊!
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> dev/email@hidden
>
> This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >adding a delegate to a class (From: Angelo Chen <email@hidden>)

  • Prev by Date: adding a delegate to a class
  • Next by Date: Re: adding a delegate to a class
  • Previous by thread: adding a delegate to a class
  • Next by thread: Re: adding a delegate to a class
  • Index(es):
    • Date
    • Thread