• 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: [Q] Using NSInvocation vs. selector with NSTimer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Using NSInvocation vs. selector with NSTimer


  • Subject: Re: [Q] Using NSInvocation vs. selector with NSTimer
  • From: JongAm Park <email@hidden>
  • Date: Mon, 18 Oct 2010 10:11:35 -0700

On 10/18/2010 9:45 AM, Keary Suska wrote:
On Oct 18, 2010, at 9:00 AM, JongAm Park wrote:

Is there any benefit in using it? My guess is that an NSInvocation instance is used repeatedly, but using the "selector" based method is not inconvenient for the most of cases.
Is there any other benefit in using the NSInvocation?
NSInvocation is a very flexible class, and can be used for a wide variety of tasks, but it is also (therefore) more cumbersome to setup and use for the simpler things that you mention. It is not often used, so if you don't know that you need it, you probably don't.
Well, what I asked actually is about the design philosophy and what the intention of creating of that was. Your last statement can't fulfill my curiosity. :)
The common design use would be situations where the method you wish the timer to call requires additional data that would be passed as arguments. Essentially the point of using invocations is to permit the timer to call any method whatsoever, regardless of the method signature.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


Thank you. So, it is about decoupling..


-- -- 子曰 不而不改 是謂過矣니라 공자께서 말씀하시길, 잘못을 하고도 고치지 않는 것, 그것을 잘못이라 한다. - 論語< 衛 靈 公>편

JongAm Park
email@hidden
Visit my personal blog at http://jongampark.blogspot.com
Visit my technical blog at http://jongampark.wordpress.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:
This email sent to email@hidden


References: 
 >[Q] Using NSInvocation vs. selector with NSTimer (From: JongAm Park <email@hidden>)
 >Re: [Q] Using NSInvocation vs. selector with NSTimer (From: Joar Wingfors <email@hidden>)
 >Re: [Q] Using NSInvocation vs. selector with NSTimer (From: JongAm Park <email@hidden>)
 >Re: [Q] Using NSInvocation vs. selector with NSTimer (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Heapshot Analysis to find Memory Accretion (Leaks)
  • Next by Date: AM/PM letter UNICODE issues
  • Previous by thread: Re: [Q] Using NSInvocation vs. selector with NSTimer
  • Next by thread: Heapshot Analysis to find Memory Accretion (Leaks)
  • Index(es):
    • Date
    • Thread