programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

turnkey w/ no window

From: Anil Rodrigues <arodrix_at_weld.com>
Date: Mon, 14 Mar 2005 16:53:04 -0500

Hello all,

After having SF sitting around for 3 years, being intimidated by=20
Windows, I am now dipping my toes in the water and maybe I can=20
get somewhere with much hand holding. ( I program just occasionally
and current jargon is still off-putting )

To start I am trying to make a simple TURNKEY utility for customers.
I want to open a data file, format the hex data for printing,=20
print and close. z-get kindly posted by Marc Hawley (1999) works =
perfectly, ( modified as needed) for file selection.

The app is basically-=20

 : shpr z-get \ using GetOpenFileName, read to buffer
        hdr \ print header ( using ." ", SPACES, CR,
        nos \ print data ( and .R
           bye=20
 ;
 =20
 This works fine from the console to print on screen.

 Using the following lifted from printexample.f:

PRINTING +ORDER

: TEST ( -- )
   WINPRINT OPEN-PERSONALITY
   ['] shpr CATCH ( *) \ Catch the app in case of error
   CLOSE-PERSONALITY
   IF ." error running application" THEN ;

PRINTING -ORDER

TEST works fine form the console, prints a nicely formatted page.
And compiles OK using STARTER.
But the compiled program runs with a console background, and needs=20
TTY.DLL on the PC.

Trying to use ' TRY 'MAIN ! where TRY calls TEST, and PROGRAM PRS=20
gets me into all sorts of trouble; the exe doesnt do anything
and doesnt exit.
This is with a variety of DISPATACHER 0 ExitProcess or other=20
combinations used in examples.

Am I on the wrong track and have to have a window for a turnkey?=20
I thought the trouble may be with printing, ( which may be so anyway)
but removing the printing didn't help.

Cheers! Anil
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Mon Mar 14 2005 - 13:55:05 PST

This archive was generated by hypermail 2.2.0 : Thu Dec 04 2008 - 03:04:19 PST