• 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: Sending messages to Objective C objects at runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending messages to Objective C objects at runtime


  • Subject: Re: Sending messages to Objective C objects at runtime
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 1 Feb 2004 15:42:47 -0600

On Feb 1, 2004, at 1:57 AM, Vincent Coetzee wrote:
My problem is how do I dynamically create a va_args, so that I can use this function and push the appropriate arguments onto the stack. I suppose an alternative mechanism would be to use NSInvocation, but that looks frightfully HEAVY. Does anyone know how to fiddle va_args in Objective C, or am I missing something really obvious.

You should use an NSInvocation for this. NSInvocation isn't actually that heavy, or difficult to use, and it'll definitely do the right thing.

I'd say you should only investigate an alternative to NSInvocation if user testing tells you the application is too slow, and profiling tells you that building NSInvocations is where it's spending most of its time.

-- Chris

--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
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: 
 >Sending messages to Objective C objects at runtime (From: Vincent Coetzee <email@hidden>)

  • Prev by Date: Finder Icon Badging...
  • Next by Date: Dragging Types
  • Previous by thread: Re: Sending messages to Objective C objects at runtime
  • Next by thread: Re: Does NSImageView dispose of it's image
  • Index(es):
    • Date
    • Thread