• 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: Should I use delegates or accessors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I use delegates or accessors?


  • Subject: Re: Should I use delegates or accessors?
  • From: "Alan Smith" <email@hidden>
  • Date: Tue, 26 Dec 2006 10:21:21 -0500

It would be for changing the image that the class uses.

[control setImage: image];

or

- (id)imageForControl:(MyClass*)control
{
 return image;
}

The delegate would be sent the imageForControl: when the class is
doing its drawing.

If there is no delegate, or it doesn't respond to that selector, than
the class could/would fall-back on the image set with setImage:.

That was my idea anyhow. Let me know what you think.
Many thanks.

Peace, Alan

--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unnecessary, then it
shall evolve."
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Should I use delegates or accessors?
      • From: Shawn Erickson <email@hidden>
References: 
 >Should I use delegates or accessors? (From: "Alan Smith" <email@hidden>)
 >Re: Should I use delegates or accessors? (From: Scott Stevenson <email@hidden>)

  • Prev by Date: Re: Build doesn't update help
  • Next by Date: Re: CoreData-App with NSTableView / NSOutlineView like iPhoto - Problem (newbie)
  • Previous by thread: Re: Should I use delegates or accessors?
  • Next by thread: Re: Should I use delegates or accessors?
  • Index(es):
    • Date
    • Thread