Tags are a pain because they are numbers, rather than symbols, and (I believe) IB does not enforce uniqueness which could lead to all kinds of mayhem. I would avoid them, personally, in the interests of maintainability. A few extra methods is a small price to pay for the sake of future-proofing your code.
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. Cheers - Paul. ----- Original Message ----- From: "I. Savant" <[email protected]> To: "Peter Ilberg" <[email protected]> Cc: <[email protected]> Sent: Thursday, February 26, 2009 3:35 PM Subject: Re: One IBAction, multiple results from multiple methods On Thu, Feb 26, 2009 at 10:16 AM, Peter Ilberg <[email protected]> wrote: > Depending on your scenario, you might be able to encode the different > cases > into bitfields. The above function then turns into something like this: That's certainly unique. :-) However, IMO, a bit less readable and definitely less flexible. Less readable because the relationship between sender/tag/intention isn't there in front of you. Less flexible because you can't use the tags as unique control IDs for use in other situations (because they must be a certain value for this to work). Interesting suggestion, though! -- I.S. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/p.sanders%40dsl.pipex.com This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
