On Tue, Apr 7, 2015, at 04:46 AM, Dave wrote:
> 
> > On 6 Apr 2015, at 15:56, Jonathan Mitchell <[email protected]> wrote:
> 
> > Tag is a readonly property for views. NSControl implements setTag:
> > If you defined a setNumberTag: method on your custom view you could use the 
> > user defined attributes in the NIB identity inspector to initialise the tag.
> 
> Is there any reason why? Seems a bit nuts to not allow it on NSViews, I
> do it all the time with UIView.

Speculation: it might just be an artifact of history, like how -target
and -action are on NSActionCell instead of NSCell.

The purpose of tag was for the recipient of an action message to figure
out which member of a group of controls was actually chosen.
Conceptually, senders were going to be NSControls, so back in the day it
might have really been a big deal to save those four bytes on each
non-control NSView instance.

--Kyle Sluder
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to