home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / programm / 5704 < prev    next >
Encoding:
Text File  |  1992-08-19  |  1.4 KB  |  47 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!kithrup!stanford.edu!ames!haven.umd.edu!darwin.sura.net!uvaarpa!clem!news
  3. From: vls@cube.handheld.com (Vern Stant)
  4. Subject: Question: Messages from fork()ed procs??
  5. Message-ID: <1992Aug19.223812.15159@cube.handheld.com>
  6. Sender: news@cube.handheld.com
  7. Nntp-Posting-Host: cube
  8. Organization: Hand Held Products, Inc.
  9. Date: Wed, 19 Aug 1992 22:38:12 GMT
  10. Lines: 35
  11.  
  12. I am trying to message a text window in the parent from a child:
  13.  
  14.  [ctlText setText: "GEORGE"];
  15.  [ctlScrollView display];
  16.  if(fork())
  17.  {
  18. ..
  19.  }
  20.  else
  21.  { 
  22.  objc_msgSend(kText,@selector(setText:),"FREDS!!!!!!!!!!!!!!!!!!");
  23.  [ctlText setText: "FREDS!!!!!!!!!!!!!!!!!!"];
  24.  [ctlScrollView display];
  25.  ...
  26.  }
  27.  
  28. GEORGE appears in the ctlText but FREDS!!!! doesn't. I have tried
  29. both [xxx xxx: xxx] and objc_msgSend(...,...,..) ways of
  30. doing it but, even though I know the child is started (it printf's also)
  31. it can't get to the parent's Text object. I also get the process
  32. exited....Window server death message in the shell I start it in.
  33. This only kills the child. The rest of the app is o.k.
  34. I am assuming that the child, having a different process ID,
  35. is disconnected. Any help would be appreciated.
  36.  
  37. Thanks,
  38. Vern
  39.  
  40.  
  41.  
  42. --
  43. Vern Stant              | The opinions expressed herein are
  44. Hand Held Products, Inc.| not necessarily those of Hand 
  45. 804.784.3090 voice      | Held Products, Inc., and may not 
  46. 804.784.3147 FAX        | even be mine. Use at your own risk
  47.