Re: IB Inspector "Tag"
Re: IB Inspector "Tag"
- Subject: Re: IB Inspector "Tag"
- From: Brant Vasilieff <email@hidden>
- Date: Sat, 29 Mar 2003 10:28:14 -0800
I should add that it doesn't have to be used as an identifier. It
could also store extra information like a minute delta.
If you had four buttons on an alarm clock for incrementing and
decrementing the minutes, and hours, you could use the tag to represent
the number of minutes to add.
+Hour tag=60
+Minute tag=1
-Hour tag=-60
-Minute tag=-1
Then all four buttons can send the same action message to the delegate
where all you have to do is fetch the tag from the sender (the button)
and then add that value as minutes to the current alarm time.
HTH,
Brant
On Saturday, March 29, 2003, at 10:14 AM, Brant Vasilieff wrote:
It's a numerical identifier (integer) used in controls as a way to
distinguish between them in your delegate without having to use
outlets.
For menu items, it's better to use the tag or selector rather than the
title or position of the item to tell which item was selected.
HTH,
Brant
On Saturday, March 29, 2003, at 08:21 AM,
email@hidden wrote:
Does anyone know what the "tag" attribute in IB is? (Look in the
Attribute Inspector for an NSTextField, for example.) Apparently, it's
a variable of NSControl, but I can't find any details on it. It can't
be a unique identifier since all of them are set to zero initially.
What is it good for?
_______________________________________________
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.