Re: NIB Files + Views. Is it a good practice?
Re: NIB Files + Views. Is it a good practice?
- Subject: Re: NIB Files + Views. Is it a good practice?
- From: Keary Suska <email@hidden>
- Date: Sun, 22 Oct 2006 12:10:41 -0600
- Thread-topic: NIB Files + Views. Is it a good practice?
on 10/22/06 6:18 AM, email@hidden purportedly said:
> Well actually I have noticed it and I use it.
> Here it is a screenshot of my application:
> http://img221.imageshack.us/img221/600/picture1eg8.png
>
> What it does is very straightforward... By clicking on the buttons it
> replaces the content of the CustomView with View1 or View2.
>
> My question focused on how to create View1 and View2 instances.
>
> What CustomView has to do with them?
If I understand you correctly, you want to "swap" out one NSView object for
another, at the click of a button? If so, this is only something that can be
done entirely in code AFAIK. You'll have to leave IB out of the picture. But
it's probably the harder way to do the job.
I see two possible alternatives:
1. Maintain the view "content" in a separate model objects. By "content" I
mean what is actually *drawn* into the view, and not the view object itself.
All the button(s) do is tell the view to draw the content from the model
they are linked to.
2. Create a tabless, borderless NSTabView. Put each view in each "pane", use
the buttons to switch tabs.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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