Re: why don't custom views have a "tag" in IB?
Re: why don't custom views have a "tag" in IB?
- Subject: Re: why don't custom views have a "tag" in IB?
- From: Matt Neuburg <email@hidden>
- Date: Tue, 21 Nov 2006 12:26:53 -0800
- Thread-topic: why don't custom views have a "tag" in IB?
On Tue, 21 Nov 2006 20:22:24 +0100, j o a r <email@hidden> said:
>
>On 21 nov 2006, at 20.10, Matt Neuburg wrote:
>
>> Why doesn't the Attributes inspector for a custom view in IB have a
>> "tag"
>> field? A custom view is a view, so it can have a tag - right? And why
>> wouldn't I want to set that tag in IB?
>
>While NSView have a -tag method, it's actually only with NSControl
>(and descendants) that you find both -tag and -setTag:, so I'm not
>surprised that it's "missing" in IB.
>
>> If I can't set a tag, it's hard to tell one custom view from another.
>>
>> The difficulty is compounded by the fact that a custom view cannot
>> have outlets.
>
>If you set it to be of a custom subclass (using the inspector) that
>have outlets, I'm pretty sure that it would work.
I'm pretty sure that it doesn't, so please actually try it in your copy of
IB and tell me what you see.
>That said, in Cocoa you typically don't subclass and extend views
>like that. You would rather have a "view controller" with outlets
>loading the nib file.
Not sure who "you" is in that sentence. The real "you" (i.e. me) thinks
that's a heavyweight solution to a lightweight problem. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden