// // GF-TEST.VDM Christian Ziemski 06.12.2003 // 10.12.2003 // // Demo to show the behavior of Get_Filename() // // Please have a look at the directory shown in the GF() dialogs. // Then cancel those GF()s. // // FSA_DIR below is the directory where the last {File, Save As} happened. // But: The *command* FSA() doesn't seem to influence it. // // The FSA-DIR is stored somewhere! // After exiting and restartig VEDIT it's there again. // And that is true for every singe instance of the VPW-executable independently!. // // (Tested under Windows2000) // // The version with the undocumented RAW option does the old behaviour (prior to 6.12.1 12/04/03) // if no path, only a simple filename // old: using FSA_DIR => dependent of Windows version! // new: using CUR_DIR as path // ChDir(HOME) // starting point ChDir Get_Filename(103,"", RAW) // o.k.: Dir=FSA_DIR ("old" behaviour) Get_Filename(103,"") // o.k.: Dir=CUR_DIR=HOME as set above Get_Filename(103,"macros\*.*", NOERR) // o.k.: Dir=CUR_DIR\macros Get_Filename(103,"notexist\*.*", NOERR) // not o.k.: Dir=FSA_DIR ChDir #103=Buf_Num Buf_Switch(Buf_Free) Ins_Text("ddd") File_Save_As("|(VEDIT_TEMP)\ved|(PID).tst", OK) // that does not change the FSA_DIR! Buf_Quit(OK) Buf_Switch(#103) Update Get_Filename(103,"notexist\*.*", NOERR) // not o.k.: Dir=same FSA_Dir as last GF() above ChDir Buf_Switch(Buf_Free) Ins_Text("Please save this file elsewhere and return via [VISUAL EXIT] Ctrl-E") Ins_Newline(1) Ins_Text("The choosen directory for this save will be the new default directory") Ins_Newline(1) Ins_Text("for the following Get_Filename()s!") Ins_Newline(1) Visual Buf_Quit(OK) Buf_Switch(#103) ChDir Update Get_Filename(103,"notexist\*.*", NOERR) // not o.k. Dir=new FSA_DIR ChDir