answer file
Klaus Major
klaus at major-k.de
Tue Nov 2 16:31:53 EST 2004
Bon soir Yves,
> Hi list
>
> on Mac OS X :
>
> I have another question :
>
> put the specialFolderPath of desktop into pathToDesktopFolder
> put the defaultFolder into tDF
> set defaultFolder to pathToDesktopFolder
> answer file "Quel fichier ?" with filter "pdf" as sheet
> set defaultFolder to tDF
>
>
> 1) is there another way to open directly on the desktop ?
> 2) the filter to "pdf" files" doesn't work..??? other files are
> displayed.
Try this one with the correct syntax, no need to remember and reset
"the directory" a.k.a "the defaultfolder" a.k.a. "Jack, the skipper" :-)
on mouseup
put specialFolderPath("desktop") & "/" into pathToDesktopFolder
# adding "/" does the trick ;-)
answer file "Quel fichier ?" with pathToDesktopFolder of type "PDF "
as sheet
# note the space in "PDF "
answer it
# or whatever...
end mouseup
But this will not show ALL pdf files eventually... :-(
I usually work around this by letting the user choose ANY file, check
afterwards and let the user know in case he choose an incompatible
file...
When you set the filename of a player on OS X, check the result
immediately
after that! It is empty in case of success and contains an error in the
other case.
Hope that helped.
> thank you
>
> Greetings.
>
> Yves COPPE
> yvescoppe at skynet.be
Au revoir et bonne nuit :-)
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list