• 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: OBJ-C question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OBJ-C question


  • Subject: Re: OBJ-C question
  • From: Kay Roepke <email@hidden>
  • Date: Sat, 17 Apr 2004 21:36:00 +0200

On 17. Apr 2004, at 20:16 Uhr, Sherm Pendley wrote:

On Apr 17, 2004, at 1:55 PM, Kay Roepke wrote:

This way you do not have the overhead of a method dispatch like you do if you have a dummy method somewhere in your ancestry.
You would check for the supported methods in your setDelegate: method and whenever you want to call the delegate methods have a check
if it's ok to send the message.

Good point. Although that would mean that you couldn't assign the delegate object, and then add delegation methods to it later. That would certainly be a rare situation, though - I can see why it wouldn't be worth worrying about.

Yup. Nevertheless I guess this technique only really makes sense if you need to call the delegate methods in tight loops.
Otherwise it's a premature optimization I wouldn't make. Like you said, it might interfere with different premature optimizations ;-)

Seriously, it's a nice way to cache nearly static information about the delegate, which one might have to resort in aforementioned
situation.

Kay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >OBJ-C question (From: "Mike R. Manzano" <email@hidden>)
 >Re: OBJ-C question (From: Ondra Cada <email@hidden>)
 >Re: OBJ-C question (From: "Mike R. Manzano" <email@hidden>)
 >Re: OBJ-C question (From: Ondra Cada <email@hidden>)
 >Re: OBJ-C question (From: Sherm Pendley <email@hidden>)
 >Re: OBJ-C question (From: Ondra Cada <email@hidden>)
 >Re: OBJ-C question (From: Sherm Pendley <email@hidden>)
 >Re: OBJ-C question (From: Kay Roepke <email@hidden>)
 >Re: OBJ-C question (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: Cocoa vs User: 0 - 1
  • Next by Date: Re: Cocoa vs User: 0 - 1
  • Previous by thread: Re: OBJ-C question
  • Next by thread: Re: OBJ-C question
  • Index(es):
    • Date
    • Thread