home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5913 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.9 KB  |  54 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!uvaarpa!clem!news
  3. From: vls@cube.handheld.com (Vern Stant)
  4. Subject: Speaker/Listener Help (Please!)
  5. Message-ID: <1992Sep1.234301.28213@cube.handheld.com>
  6. Sender: news@cube.handheld.com
  7. Nntp-Posting-Host: cube
  8. Organization: Hand Held Products, Inc.
  9. Date: Tue, 1 Sep 1992 23:43:01 GMT
  10. Lines: 42
  11.  
  12. I am (desperately) trying to get 2 apps to communicate by speaker/listener.  
  13. Presently, I have both the speaker and listener in 1 app. Neither the speaker  
  14. nor listener is set to being the App's. kText is an otherwise functional text  
  15. object. They are inited like this: 
  16.  
  17.    
  18.    myListener = [[Listener alloc] init];
  19.    [myListener setDelegate: kText];
  20.    [myListener checkInAs:"vern_w_in"];
  21.    [myListener setPriority:NX_MODALRESPTHRESHOLD];
  22.    [myListener addPort];
  23.    
  24.    mySpeaker = [[Speaker alloc] init];
  25.  
  26.    thePort = NXPortFromName("vern_w_in", NULL); 
  27.  
  28.    if (thePort != PORT_NULL) 
  29.     [mySpeaker setSendPort:thePort];
  30.     else printf("\n The sucker was NULL \n"); 
  31.  
  32. thePort is not null unless I change the "vern_w_in" text to not match. If the  
  33. two text strings don't match the "...was NULL" does print. I try to put text  
  34. into kText:
  35.  
  36.  
  37.  msgDelivered = [mySpeaker performRemoteMethod:"setText"
  38.                            with: "Hello There"
  39.                length:11];
  40.  printf("\nmsgDelivered = %d\n",msgDelivered);               
  41.  
  42. msgDelivered is always 0 (unless The sucker was NULL above) no matter
  43. what I send mySpeaker. I've tried "setText:","@selector(setText:)" etc.
  44. No errors on the console, but no text either!! Any help would be appreciated!!!
  45.  
  46. befuddled in Richmond
  47. Vern
  48.  
  49. --
  50. Vern Stant              | The opinions expressed herein are
  51. Hand Held Products, Inc.| not necessarily those of Hand 
  52. 804.784.3090 voice      | Held Products, Inc., and may not 
  53. 804.784.3147 FAX        | even be mine. Use at your own risk
  54.