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

[MacPerl] &MacPerl::Choose() and directories



I must say I find the use of &MacPerl::Choose() intimidating. I can use the
examples from the documentation, like

     require "GUSI.ph";
     $dir = MacPerl::Choose(&GUSI::AF_FILE, 0, "", "", &GUSI::CHOOSE_DIR);


but can anybody *please please please* explain what these parameters are?

     MacPerl::Choose DOMAIN, TYPE, PROMPT, CONSTRAINT, FLAGS, DEFAULT

By the way, I found a bug (in MacPerl5.06, maybe it's disappeared now):

     $dir = MacPerl::Choose(GUSI::AF_FILE, 0, "", "", GUSI::CHOOSE_DIR);

as in the documentation, does nothing, while it works if you add the ampersands:

     $dir = MacPerl::Choose(&GUSI::AF_FILE, 0, "", "", &GUSI::CHOOSE_DIR);

Either the documentation is wrong, or MacPerl behaves badly. BTW, is suspect
that "GUSI::AF_FILE" is treated as a litarel string, not as the number it's
supposed to represent.


Now my main question: is it possible, when choosing a directory, to get the
file names *in grey*, just like when choosing a "new file", instead of
invisible? 
I've seen this in one program, and I find that very practical. This way, you
can see what's in the folders, so you *know* what you're looking at.

Does this need a patch to MacPerl's interface, or just the addition of
another flag?


--- Embracing the KIS principle: Keep It Simple