Directory Picker

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Directory Picker

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:35 pm

by desmond >> Fri, 2 Nov 2001 2:07:54 GMT

Hi Developers

Is it possible to make a directory picker in Jade? there is file picker, color picker, but all I need is a directory picker. any ideas??

Thanks
Desmond
DTS Japan

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Directory Picker

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:35 pm

by cnwdad1 >> Fri, 2 Nov 2001 2:31:07 GMT

Hi Desmond,

Check out the FileFolder::browseForFolder (and browseForServerFolder) method - the dialog is a little "bland", but it does the job.

regards,
darrell.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Directory Picker

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:35 pm

by desmond >> Fri, 2 Nov 2001 3:55:21 GMT

Thanks a lot Darrell!

Desmond

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Directory Picker

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:35 pm

by hanisoft >> Thu, 13 Dec 2001 7:59:50 GMT

I've tried direct picker. But 'mask' property of FildFolder won't work, so I pick files directly not via Browser.
The source is below.

viewSystemDir()updating;
vars
f : FileFolder;
s : Integer;
fl, fl2 : FileNode;begin

create f transient;
foreach fl in f.files do
if fl.fileName = '\WINDOWS' then
break;
endif;
endforeach;

foreach fl2 in fl.FileFolder.files do
if fl2.fileName = '\WINDOWS\FONTS' then
break;
endif;
endforeach;

foreach s in 1 to fl2.FileFolder.files.size do
write fl2.FileFolder.files[s].fileName;
endforeach;
// write f.files[1].FileNode.name;

delete f;
end;

Above processor takes a lot of time.
Any other idea?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Directory Picker

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:35 pm

by cnwjhp1 >> Thu, 13 Dec 2001 22:35:45 GMT

You could try...

viewSystemDir()updating;
vars
f : FileFolder;
fl : FileNode;begin

create f transient;
f.fileName := 'c:\WINDOWS\FONTS';

foreach fl in f.files do
write fl.fileName;
endforeach;

epilog
delete f;
end;

Cheers,
John P


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 27 guests