[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Where is prompt in MacPerl'Choose?



Surely this has been talked about here before, but I've been watching, and
I haven't seen the answer.

The question is, why doesn't MacPerl'Choose display the prompt when asking
the user to choose an existing file?

Especially strange considering that the prompt appears just fine when asking
the user to name a new output file.

To be more explicit, this code displays the standard file open, but does not
display the prompt "Text to process?":

$file = &MacPerl'Choose(&GUSI'AF_FILE, 0, "Text to process?", "", 0, "");

However, this code does display the prompt "Output file?":

$outfile = &MacPerl'Choose(&GUSI'AF_FILE, 0, "Output file?",
        "", &GUSI'CHOOSE_NEW + &GUSI'CHOOSE_DEFAULT, "$file.out");

This same has been true since 4.1.3, and I just tried it with 5.0.7.r1m with
the same results.

And, I found this interesting comment in StandardFile.pl:

# Name
#   GetFile
# Syntax
#   $filename = &GetFile([$prompt, ] @types [, $default]);
# Description
#   Query a existing file name to user by Standard File Dialog Box.
#   $prompt is a user prompt, which is ignored under 4.1.1, but will
#   probably be shown in a future version. $prompt should never be a
#   string of length 4.
#   @types is a list of the file type which is used for
#   filtering the file list in the dialog box.
#

Is it something I'm doing? Platform problems (I'm on an Power Mac)? Is there
a work-around?

Many thanks,

Fred Toth
ftoth@synernet.com