RE - defaultFolder usage

Ken Ray kray at sonsothunder.com
Tue Jul 16 10:15:01 EDT 2002


Filippo, trying to set the defaultFolder before opening an answer file
dialog does indeed fail to work in Win2K and WinXP. However, in Win2K you
can pass the directory to open in the answer file command:

  answer file "Pick a file:" with "C:/"

However after some additional research, here's what I found (under both
Windows 2000 and Windows XP). Keep in mind that in Windows, there is  a
"File name:" box at the bottom of the open file dialog box which is editable
and changes to the name of the file you select in the dialog box (I'll call
this the "file name box").

1) answer file "Pick a file:" with "C:/" - opens to the C drive with nothing
in the file name box.
2) answer file "Pick a file:" with "C:/winnt/" - opens to the last folder
MetaCard remembered me opening files from, with nothing in the file name
box.
3) answer file "Pick a file:" with "C:/winnt" - opens to the C drive, with
"winnt" in the file name box.
4) answer file "Pick a file:" with "C:/winnt/notepad.exe" - opens to the
"C:/winnt/" directory, with "notepad.exe" in the file name box.

It appears that unless you are pointing at the root level of a volume, you
cannot open to the specified directory *unless* you provide a file name also
(which will appear in the file name box), and that the only time you can
open to a specific directory *without* something in the file name box is
when you point at the root level of a volume.

This means you can do something like:

  answer file "Pick a file:" with "C:/winnt/(select a file)" and it will
open to the "C:/winnt/" directory with "(select a file)" in the file name
box

but this is funky.

Perhaps there's some way around this?

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


----- Original Message -----
From: "Filippo Galimberti" <fgalimbe at FastWebnet.it>
To: <use-revolution at lists.runrev.com>
Sent: Tuesday, July 16, 2002 7:28 AM
Subject: RE - defaultFolder usage


> > Actually, guys, it *does* work in Windows, just not in all *versions* of
>  > Windows. For example, in Windows 2000 it will work just fine. However
in
>  > Windows XP, it won't. Filippo, what version of Windows are you using?
>  > Ken Ray
>
> Dear Ken,
> thank you for the information.
> I'm working mostly on XP Pro, but I also did some brief testing on 2K (Pro
> Service Pack 2 Italian and Server Italian), and "defaultFolder" seems to
> not work correctly on both.
> Best regards
> Filippo Galimberti
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list