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: "Jeff Laing" <email@hidden>
- Date: Thu, 26 Feb 2009 15:06:30 -0700
- Thread-topic: One IBAction, multiple results from multiple methods
That's because you aren't making the point hard enough.
Make the seekForward: method look at the bottom "two digits" in the ID
of the button. That lets the interface designer has a 1x 2x 4x 8x 16x
seek buttons it he wants to, or just 1x
- (IBAction)seekForward:(id)sender
{
[self seekBy:1+(id & 0x0F)]
}
Its putting "business meaning" into the otherwise abstract 'id' values
but its your application, design it the way you want to and ignore the
purists who would tell that 'its bad'.
-----Original Message-----
From: cocoa-dev-bounces+jeff.laing=email@hidden
[mailto:cocoa-dev-bounces+jeff.laing=email@hidden] On
Behalf Of I. Savant
Sent: Friday, 27 February 2009 3:12 AM
To: Michael Ash
Cc: cocoa-dev
Subject: Re: One IBAction, multiple results from multiple methods
On Thu, Feb 26, 2009 at 10:53 AM, Michael Ash <email@hidden>
wrote:
> It's true that there are scenarios where dispatching off the tags are
> helpful, but I don't think that this is one of them.
You're absolutely right, it's a stretch to use this example because
it's not complicated enough to highlight the point I'm making.
Laziness is my only excuse for not providing a more complex example.
:-)
--
I.S.
_______________________________________________
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:
o.com
This email sent to email@hidden
_______________________________________________
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