name=save: Options

More advanced topics discussed.

Moderators: Susan Smith, admin, Gabriel

Post Reply
bluesfannoz
Posts: 274
Joined: Fri Jun 19, 2009 9:01 am
Location: Topeka, Kansas
Contact:

name=save: Options

Post by bluesfannoz »

Does anyone know if it is possible to prepopulate the filename to use in the name=save: dialog box? This is available to us on the name=open: dialog box, but trying the same syntax does not seem to work.

I am using 4.20o so it would need to be an option in that version.

Brwiki example:

Code: Select all

00010 OPEN #1: "name=SAVE:.,recl=1,new",EXTERNAL,OUTPUT IOERR PROBLEM
00020 PRINT FILE$(1);" ";LREC(1)
00030 CLOSE #1: 
00040 STOP 
00100 PROBLEM: ! There was a problem opening the file.
00110 IF ERR=4150 THEN !:
      PRINT "Could not create file:";FILE$(1) !:
      STOP  ! FILE$(1) is blank!
00120 PRINT "Err:";ERR;" Line:";LINE !:
      STOP 
Steve Koger
Computer Specialist
SEKESC-MACS Division
Gabriel
Posts: 401
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: name=save: Options

Post by Gabriel »

I do it like this and it seems to work fine:

Code: Select all

open #(Fexportfile:=Fngetfilenumber): "name=save:*.sio,new,recl=1000",internal,output,sequential error IGNORE
The above example is taken from the ScreenIO designer, and it works in 4.1 and 4.2 and 4.3 and is actively tested in each of those environments often. This is the code that allows the user to select where to save the Export File when the user chooses the "Export Screen" option from the menu. It allows them to enter a name and forces them to use the ".sio" extension.

Can you perhaps give us more information? What exactly did you try and what errors did you get, or what happened when you tried it?

Gabriel
bluesfannoz
Posts: 274
Joined: Fri Jun 19, 2009 9:01 am
Location: Topeka, Kansas
Contact:

Re: name=save: Options

Post by bluesfannoz »

Because there is no Folder selection box, my intent was to supply a specific filename. That being bdgdmp.dat. Then letting them browse to the specific folder that they wanted to create it in. If they then changed the filename when they returned from the selection box I would force them to go back and change it back to bdgdmp.dat.

When I did the following I got a Save selection box but with no filename.

Code: Select all

Open #98: "NAME=SAVE:.\bdgdmp.dat,RECL=1,NEW",External,Output Ioerr CHK_CANCEL
Steve Koger
Computer Specialist
SEKESC-MACS Division
Post Reply