🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Speaker/Listener Help (Please!)

#987
From: Vern Stant
Date: Tue, 01 Sep 1992 23:43
42 lines
1954 bytes
I am (desperately) trying to get 2 apps to communicate by speaker/listener.  
Presently, I have both the speaker and listener in 1 app. Neither the speaker  
nor listener is set to being the App's. kText is an otherwise functional text  
object. They are inited like this: 

   
   myListener = [[Listener alloc] init];
   [myListener setDelegate: kText];
   [myListener checkInAs:"vern_w_in"];
   [myListener setPriority:NX_MODALRESPTHRESHOLD];
   [myListener addPort];
   
   mySpeaker = [[Speaker alloc] init];

   thePort = NXPortFromName("vern_w_in", NULL); 

   if (thePort != PORT_NULL) 
    [mySpeaker setSendPort:thePort];
    else printf("\n The sucker was NULL \n"); 

thePort is not null unless I change the "vern_w_in" text to not match. If the  
two text strings don't match the "...was NULL" does print. I try to put text  
into kText:


 msgDelivered = [mySpeaker performRemoteMethod:"setText"
                           with: "Hello There"
			   length:11];
 printf("\nmsgDelivered = %d\n",msgDelivered);			   

msgDelivered is always 0 (unless The sucker was NULL above) no matter
what I send mySpeaker. I've tried "setText:","@selector(setText:)" etc.
No errors on the console, but no text either!! Any help would be appreciated!!!

befuddled in Richmond
Vern

--
Vern Stant              | The opinions expressed herein are
Hand Held Products, Inc.| not necessarily those of Hand 
804.784.3090 voice      | Held Products, Inc., and may not 
804.784.3147 FAX        | even be mine. Use at your own risk
Technical Details
Message-ID: <1992Sep1.234301.28213@cube.handheld.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!uvaarpa!clem!news

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!uvaarpa!clem!news
From: vls@cube.handheld.com (Vern Stant)
Subject: Speaker/Listener Help (Please!)
Message-ID: <1992Sep1.234301.28213@cube.handheld.com>
Sender: news@cube.handheld.com
Nntp-Posting-Host: cube
Organization: Hand Held Products, Inc.
Date: Tue, 1 Sep 1992 23:43:01 GMT
Lines: 42