home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / toolkits / xview / 1094 < prev    next >
Encoding:
Text File  |  1992-11-23  |  1.9 KB  |  51 lines

  1. Newsgroups: alt.toolkits.xview
  2. Path: sparky!uunet!mcsun!chsun!hslrswi!gamma!francis
  3. From: francis@hslrswi.hasler.ascom.ch (Demierre F.,85L2,x3503)
  4. Subject: Re: Printing from within an Xview program
  5. Message-ID: <1992Nov23.153949.12295@hasler.ascom.ch>
  6. Sender: news@hasler.ascom.ch
  7. Reply-To: francis@hslrswi.hasler.ascom.ch
  8. Organization: Ascom Hasler AG
  9. References: <1992Nov11.102855.6216@ericsson.se>
  10. Date: Mon, 23 Nov 1992 15:39:49 GMT
  11. Lines: 38
  12.  
  13. In article 6216@ericsson.se, etljmme@etlxd10h.etlxd (jim moore xd/nda) writes:
  14. >I must admit, despite the warning in the XView documentation, I have been using
  15. >system calls in my Xview apps. (quite extensively in some).  I have _never_ had
  16. >any problems doing this although this may be just luck.  My suggestion: go for it!
  17. >
  18. >Good luck, Jim
  19. >
  20.  
  21. Hi, 
  22.  
  23. a little comment for this..
  24.  
  25. I also use system() calls in my Xview applications but it can lead to 
  26. problems:
  27.  
  28.   1. While system(whatsoever) is running, refreshes will not be done. If
  29.      the whatsoever command takes a long time to complete and the user covers
  30.      and uncovers the window, it does not get refreshed.
  31.  
  32.   2. If your application is supposed to allow other things to happend (i.e: 
  33.      several frames with action buttons) while the first action is carried 
  34.      out, the pressed button (for example) will not react before the system()
  35.      call returns.
  36.  
  37. My conclusion is that it is OK to use system() if the shell command is fast 
  38. to complete. An lpr command falls into this category.
  39.  
  40. Another way, if you do not bother about messages and results can also be to do
  41. "system(" something 1>/dev/null 2>&1 &")  not very smart, I know ;-)
  42.  
  43.  
  44. Francis
  45.  
  46. -----------------------------------------------------------------------
  47. Francis Demierre       UUCP: ...!mcsun!chx400!hslrswi!francis
  48.                        Internet: francis@hasler.ascom.c
  49. -----------------------------------------------------------------------
  50.  
  51.