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