Re: window with a lot of controllers
Re: window with a lot of controllers
- Subject: Re: window with a lot of controllers
- From: Ondra Cada <email@hidden>
- Date: Mon, 10 May 2004 18:16:25 +0200
Denis,
On 10.5.2004, at 17:24, Denis Queffeulou wrote:
>
> Normally, you prepare just one tab in its own NIB, and load it as many
>
> times as you need (see also the new NSNib class). It is *ways* more
>
> convenient than creating widgets programmatically.
>
>
>
but you have to create at least one tab (or window) in IB.
>
And I have to do so for all the different tabs ?
Depends. If the tabs are similar, it may be easier to just update one
type programmatically to get another one... well, anything goes ;)
Anyway, you have to create each tab type *somehow*. In a vast majority
of cases (of course there always are exceptions, but they are pretty
rare) it is much easier to do that in IB than in code. Neverthless, you
may do anything you want to, and/or combine both approaches.
>
But I don't see exactly how to create only one tab in a NIB with IB
>
without create a window !?
A NIB can contain just an NSView (in IB it is called a "custom view").
(If it could not--as it used to be not too long ago--you would place
the thing into a window and then release the window programmatically:
no real hurdle. The current case is more convenient, of course.)
>
And what about the controller class, I have to instanciate one
>
controller class for each tab ?
Nope, in such a case you use the File's Owner.
>
I'm newbie, and my bigger app is a little document based with "static"
>
GUI.
Generally, for a newbie I would recommend to stick with a relatively
plain GUI (means there should be ten or twenty widgets by a window, not
a hundred or thousand). When you master the simple ways (like, in this
case, when you are familar with things like on-demand NIB loading and
File's Owner), you graduate to more complex ones (like multi-NIB
documents).
That's not imperative, of course: you *can* begin with as complex thing
you want to; the drawback though is that you have to master more tasks
at once to get it working, which may be a bit frustrating.
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.