home *** CD-ROM | disk | FTP | other *** search
- Path: 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
-
- 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)
-