Re: Finding a view (Cocoa theory)
Re: Finding a view (Cocoa theory)
- Subject: Re: Finding a view (Cocoa theory)
- From: Ed Baskerville <email@hidden>
- Date: Fri, 18 Feb 2005 17:23:34 -0800
Hi Mark,
You could subclass NSView and use tags (override the tag method)
together with NSView's subviews and superview methods to do this. Or
you could create your own system of giving NSViews IDs--if it's a
custom class, you can of course do anything you want! I can see this
making sense if you're managing a bunch of dynamically created views.
For most everyday tasks, however, an outlet is probably easiest and
best.
That answer your question?
--Ed
On Feb 18, 2005, at 5:00 PM, Mark Dawson wrote:
Does Cocoa allow finding an NSView? From what I can tell, there isn't
any unique ID for a view, so from any spot in a view hierarchy, it
doesn't seem programatically possible to find a view that's either a
sibling, super, or sub view from any particular view. Is that
correct? So, if you want to use any particular view, you need to set
it up as an outlet, correct?
Thanks,
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden