Re: One IBAction, multiple results from multiple methods
Re: One IBAction, multiple results from multiple methods
- Subject: Re: One IBAction, multiple results from multiple methods
- From: "Paul Sanders" <email@hidden>
- Date: Thu, 26 Feb 2009 16:24:42 -0000
>>> What IB should do, of course, is let you type in symbolic names for
>>> your
>>> tags and generate an include file containing a set of unique
>>> #defines.
>>> That's what I'm used to on a certain other OS, anyway.
>>
>> Absolutely agree. File a request. :-)
>>
>> --
>> I.S.
> What you have there, if I'm not mistaken, then, is essentially the
> concept of a represented object that's a string, yes?
> Cheers,
> Andrew
No, it's an object (or, if you like, an action) represented by a symbol:
// Generated by IB
#define IDC_CUT 1
#define IDC_COPY 2
#define IDC_PASTE 3
// Coded by Joe Soap
switch (tag)
{
case IDC_CUT:
...
case IDC_COPY:
...
case IDC_PASTE:
...
}
It frees you from worrying about what the numerical values actually are. IB
should [be free to] assign those, although there might be issues if you want
values to be unique across more than one NIB (Visual Studio handles this by
allowing you to set a 'starting value', per resource file, e.g. 1000, 2000,
...).
_______________________________________________
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