• 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: window with a lot of controllers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >RE: Resize Matrix (From: email@hidden)
 >window with a lot of controllers (From: Denis Queffeulou <email@hidden>)
 >Re: window with a lot of controllers (From: Ondra Cada <email@hidden>)
 >Re: window with a lot of controllers (From: Denis Queffeulou <email@hidden>)

  • Prev by Date: Customized NSTextView drawing
  • Next by Date: Re: use of c select() style events with the objc run loop
  • Previous by thread: Re: window with a lot of controllers
  • Next by thread: Re: window with a lot of controllers
  • Index(es):
    • Date
    • Thread