Richard, try the following,
Mike
---------------------------------------------------------
OFN-DIALOGS +ORDER \ Expose the OFN wordset
OFN-DIALOG SUBCLASS MY-FILE-DIALOG
CREATE MY-FILES \ What to allow in dialog
,Z" My text files (*.TXT)" ,Z" *.TXT"
,Z" SNG Files (*.SNG)" ,Z" *.SNG"
,Z" All files (*.*)" ,Z" *.*"
0 ,
\ We'll redefine a DEFER: word for our purpose
: CUSTOM ( -- title filter flags )
Z" Select My Files" ( Title )
MY-FILES ( filename template )
DEFAULT-OPEN-FLAGS OFN_FILEMUSTEXIST OR ( flags, see SDK ) ;
END-CLASS
OFN-DIALOGS -ORDER \ Hide it
: MY-FILE-NAME ( -- string|0 ) \ 0 if canceled
[OBJECTS MY-FILE-DIALOG MAKES MY-FD OBJECTS]
MY-FD CHOOSE
PAD OFF ( Default is empty string )
IF MY-FD FILENAME ZCOUNT PAD PLACE PAD THEN ;
: GO MY-FILE-NAME CR COUNT TYPE ;
----- Original Message -----
From: "Richard Owlett" <rowlett_at_atlascomm.net>
To: <sftalk_at_forth.com>
Sent: Sunday, October 14, 2001 12:22 PM
Subject: [sftalk] How to use funtions in Ofn.f ?
>
> I wish to be presented with a window which looks like that given
when
> choosing
> File-Edit from SwiftForth main menu bar. I wish templates of form
> "*.SNG" and "*.TXT". The output should be a pointer to string of
form
> ADRIVE:\A_SERIES_OF_DIRECTORIES\afile.EXT
>
> I think everything I need is in Ofn.f -- but how do I use it?
>
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Mon Oct 15 2001 - 08:45:40 PDT
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 06-Feb-2012. Archive updated nightly.