Re: Newbie question:IB, NSView, NSViewController
Re: Newbie question:IB, NSView, NSViewController
- Subject: Re: Newbie question:IB, NSView, NSViewController
- From: Andreas Mayer <email@hidden>
- Date: Thu, 5 Jun 2008 17:34:23 +0200
Am 05.06.2008 um 15:46 Uhr schrieb Johnny Andersson:
let's suppose that I want to put a "module" consisting of an
NSViewController, controlling the view with two buttons, which in
turn contains a DrawView, on my main window.
You don't put controllers on windows.
Do I put my DrawViewController in the root of the MainWindow NIB,
and if so, how do I specify where the view will end up?
Which view? You may move views around - even between windows. But I'm
not sure that is what you are asking about.
Or, do I instantiate a a DrawViewController in my DrawView NIB, and
put a DrawView directly into the main window?
That's possible. If it is what you *want* to do, I don't know ...
If it helps, here's what I would have done if I was using Qt:
1) Create DrawWidget
2) Create FancyDrawWidget (containing the buttons, a DrawWidget and
connections)
3) Create HandwritingWidget, which contains all the logic + a
FancyDrawWidget.
4) Plop a HandwritingWidget somewhere on my main window.
I don't know Qt, so that doesn't help much. Sounds like this design
does not properly differentiate between view and controller.
Like I said above: You don't place controllers on windows. You *may*
put them inside nibs.
Andreas
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden