• 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: ***Junkmail*** How do I programaticly create a va_list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ***Junkmail*** How do I programaticly create a va_list


  • Subject: Re: ***Junkmail*** How do I programaticly create a va_list
  • From: Jeff LaMarche <email@hidden>
  • Date: Tue, 13 Jan 2009 15:22:20 -0500

I can reinforce Bill's advice here. I tried to do this same thing once, fairly recently actually, so that I could subclass a Foundation class that had a variadic init method. I lost several hours of my time and a lot of my sanity trying to find a way to make it work before giving up.


On Jan 13, 2009, at 11:48 AM, Bill Bumgarner wrote:

On Jan 13, 2009, at 8:32 AM, Horst Jäger wrote:
I have a problem concerning the va_list. I don't know how to programaticly create one.

I need to do this because I want to use the initWithFormat method of NSString. But I neither know how many args there will be nor are the args Strings - they are selectors the associated methods of which return Strings.

... rest of excellent problem description deleted ...

In short, you don't want to do this. Specifically, creating a vaargs list to be passed as a parameter to another method effectively requires encoding the arguments in whatever fashion the compiler would encode them. It is highly architecture specific and is rife with really awesomely tedious details that are easy to screw up.

_______________________________________________

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: 
 >***Junkmail*** How do I programaticly create a va_list (From: Horst Jäger <email@hidden>)
 >Re: ***Junkmail*** How do I programaticly create a va_list (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: open folders as documents
  • Next by Date: Re: IKImageBrowserView drag and drop/reordering when using core data [SOLVED]
  • Previous by thread: Re: ***Junkmail*** How do I programaticly create a va_list
  • Next by thread: runModalForWindow, best solution to modal session
  • Index(es):
    • Date
    • Thread