Article View: comp.sys.next.programmer
Article #1963Re: Multiple instances of IB objects
From: Ray Spalding
Date: Thu, 24 Dec 1992 19:11
Date: Thu, 24 Dec 1992 19:11
21 lines
1578 bytes
1578 bytes
In article <1992Dec23.233230.1472@drefla.mese.com> matt@drefla.mese.com (Matt Brandt) writes: >If I create a window in IB with lots of gadgets and connections in it how >can I get multiple instances of that window that act correctly at >runtime? One way is to create your interface that is to be duplicated in a separate (non-main) nib file, using Document->New Module in IB. You also create (but don't instantiate in IB) a custom Object to be the "File's Owner" of this nib file. To duplicate the interface, in your main code you make a new instance of your custom object with [[customObject alloc] init]. In the customObject "init" method, you do a [NXApp loadNibSection:"myDocument" owner:self]. This instantiates a new copy of everything in your secondary nib file. Any connections to the "File's Owner" in your secondary nib file are linked up to the instance of your customObject you just created above. -- Ray Spalding, Office of Information Technology Georgia Institute of Technology, Atlanta Georgia, 30332-0715 Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
Technical Details
Message-ID:
<78800@hydra.gatech.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!paladin.american.edu!gatech!prism!xray.gatech.edu!cc100aaReferences:
<1992Dec23.233230.1472@drefla.mese.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!paladin.american.edu!gatech!prism!xray.gatech.edu!cc100aa From: cc100aa@xray.gatech.edu (Ray Spalding) Newsgroups: comp.sys.next.programmer Subject: Re: Multiple instances of IB objects Message-ID: <78800@hydra.gatech.EDU> Date: 24 Dec 92 19:11:20 GMT References: <1992Dec23.233230.1472@drefla.mese.com> Sender: news@prism.gatech.EDU Organization: Georgia Institute of Technology Lines: 21