• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie question:IB, NSView, NSViewController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Newbie question:IB, NSView, NSViewController (From: Johnny Andersson <email@hidden>)

  • Prev by Date: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • Next by Date: Re: CATextLayer question
  • Previous by thread: Newbie question:IB, NSView, NSViewController
  • Next by thread: Re: Newbie question:IB, NSView, NSViewController
  • Index(es):
    • Date
    • Thread