Re: 3 IB Qs: actions; view tags; NSWindow setFrame
Re: 3 IB Qs: actions; view tags; NSWindow setFrame
- Subject: Re: 3 IB Qs: actions; view tags; NSWindow setFrame
- From: "Clark S. Cox III" <email@hidden>
- Date: Fri, 21 Feb 2003 12:44:23 -0500
On Friday, Feb 21, 2003, at 12:18 US/Eastern, David Remahl wrote:
fredagen den 21 februari 2003 kl 18.06 skrev Stiphane Sudre:
2) No tags for custom views?
Interface Builder doesn't allow a "tag" value to be assigned to a
custom view.
The Attributes panel is empty and marked as "Not Applicable". Tags
are part of
NSView so it seems that they *could* be applied. Just an oversight?
Report it as a bug with Apple.
A NSView does not have any tag data just a method which returns -1.
Since you're using the NSView inspector in IB for your custom view,
it's correct that the tag part is disabled.
Then why is it in the header? It doesn't serve backwards compatibility
at all to have these:
No, but it provides a common interface for subclasses.
- (id)viewWithTag:(int)aTag;
- (int)tag;
Why isn't this API functional in NSView?
It is functional, tag returns -1, and subclasses can change that.
viewWithTag: returns a subview with a particular tag.
It wouldn't take a lot of
effort for apple to provide a default implementation and the only
overhead would be the storage for the tag.
_______________________________________________
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.