Re: Creating NSViews with code.
Re: Creating NSViews with code.
- Subject: Re: Creating NSViews with code.
- From: Carl Gieringer <email@hidden>
- Date: Fri, 18 Feb 2005 09:43:28 -0900
Hi:
I am working on a similar situation: I have an inspector panel that I
want to update as the program's "selection" changes. I am going to use
the suggestion by Daniel quoted below (he just sent this out regarding
"How to create a subview NIB") In my "inspector" NIB I will have one
panel, and then four CustomViews. When it is time to update the
panel's content (because the program's selection changed), I will
switch out the panel's contentView with one of the views in the NIB.
(Also, I will use NSWindow's setFrame:display:animate: to change the
panel to be large/small enough for the incoming view.)
I think that this method could be a neat solution to your problem of
changing your application window's content on the fly.
On Feb 18, 2005, at 8:58, daniel wrote:
Does. Not. Compute.
You said you didn't want to have a window as a superview, but an
NSPanel is a window!
If you still don't want the wasted NSPanel instance, then yes, you
just drag a "Custom View" to the top-level window for your nib file.
While editing the nib (and testing the interface), IB does the honors
of substituting a generic window container around your view so you can
get an idea of how it might look in its eventual home.
Daniel
On Feb 17, 2005, at 7:42, Coleman Nitroy wrote:
On Feb 17, 2005, at 11:16 AM, j o a r wrote:
The tab view keeps the hidden views in some sort of collection, but
they are no longer in the view hierarchy of the window. Not that we
should care perhaps, it's probably to be considered an implementation
detail of the tab view.
If you choose to use a tab view, you would of course in this case
implement the tab view delegate methods to be notified of changes to
the selection, and update wich views you use for drawing accordingly.
Ah, great help. Thanks again.
---
Coleman Nitroy
email@hidden
nitroy.com/cole
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
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