🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #406

Re: Need help with multiple nib file programming...

#406
From: Gregory H. Anderson
Date: Sat, 01 Aug 1992 19:58
40 lines
1667 bytes
In article <1992Jul29.184519.22474@aio.jsc.nasa.gov>  
bill@epnxt.jsc.nasa.gov writes:
> I have several modules (a nib for each module) and would like for one  
> module to talk to another but I can not connect the modules together via  
> IB with the control drag mouse routine.  
> 
> How do I have the modules communicate with each other?  
> 
> Thanks in advance.
> 
> 		Bill

Connections cannot be maintained between NIB files, which is why you can't  
control-drag. There is simply nothing to resolve to at load-time.

You have to do it through the app (your own subclass) or the app's  
delegate (your own delegate), either of which needs an instance variable  
for the pieces that need to intercommunicate. Then each instance variable  
needs a method that simply returns the object's ID. For example:

@interface AppDelegate
{
	id object1;
	id object2;
}
- object1;
- object2;
@end

Then in code you say
#import AppDelegate.h
....
	[[[NXApp delegate] object1] doSomeMethod:sender];
....

--
Gregory H. Anderson          | "We're very tolerant around here,
Benevolent Dictator-for-Life |  being only amateurs ourselves."
Anderson Financial Systems   | - Tortoise (Godel, Escher, Bach)
greg@afs.com  (Nextmail OK)  | 
Technical Details
Message-ID: <1992Aug1.195812.831@afs.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!usc!rpi!psinntp!psinntp!afs!greg
References: <1992Jul29.184519.22474@aio.jsc.nasa.gov>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!usc!rpi!psinntp!psinntp!afs!greg
From: greg@afs.com (Gregory H. Anderson)
Subject: Re: Need help with multiple nib file programming...
Message-ID: <1992Aug1.195812.831@afs.com>
Sender: greg@afs.com
Reply-To: greg@afs.com
References: <1992Jul29.184519.22474@aio.jsc.nasa.gov>
Date: Sat, 1 Aug 1992 19:58:12 GMT
Lines: 40