Re: Multiple Targets in Project Builder
Re: Multiple Targets in Project Builder
- Subject: Re: Multiple Targets in Project Builder
- From: Julian Barkway <email@hidden>
- Date: Wed, 21 May 2003 18:09:09 +0200
On Wednesday, May 21, 2003, at 05:43 pm, John Nairn wrote:
I looked, but could not find an option in Project Builder to duplicate
a target. I would like to create multiple targets in one project. The
projects are very similar except for some core code and except for
target settings like application name and document extensions. In Code
Warrior, I used to duplicate a target and then make the few required
changes. In Project Builder it seems like I had to create a blank
target and then enter all settings. Is there a better way?
Why would you want to do this? You can attach multiple objects to the
same action and if you need to differentiate between the invokers of
your action method you can use the 'sender' parameter, as follows:
(IBAction) anAction: (id) sender
{
if ([sender tag] == anInterestingNumber)
[self doSomeStuff];
else
[self doSomeOtherStuff];
}
or by invoking isKindOfClass: on sender. E.g:
if ([sender isKindOfClass: [AnInterestingObject class]])
[self doSomeStuff];
Cheers,
Julian.
_______________________________________________
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.