Upon doing some testing for Mac OS X, if you use the "with filter" clause, you MUST use the file type arguement, and no wild cards characters are allowed in the file type. For example:

answer file "choose a file" with filter "F+PR,bob*.prg" -- allows selection of all Foxpro Program files beginning with "bob" and ending in ".prg"
answer file "choose a file" with filter "*,bob*.prg" -- no dice
answer file "choose a file" with filter ",bob*.prg" -- still no dice
answer file "choose a file" with filter "bob*.prg" -- nuh uh. nix. nada.

You can see that if you don't know the file type, the "with filter" clause is useless to you. Also note, that on OS X you can SEE the files, but cannot select them if they do not match the filter. Also be aware that the file type IS case sensitive.

I think since this seems to work differently between Windows and Mac OSes, you will need to include logic to handle different Oes.

Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM

Sarah Reichelt wrote:
On 8/28/06, Martin Baxter <[EMAIL PROTECTED]> wrote:
Sarah Reichelt wrote:
On 8/25/06, Sarah Reichelt <[EMAIL PROTECTED]> wrote:
Hi all,

The "answer file" command usually gets me thoroughly confused, but
this time, I'm not sure it is able to do what I want.

I want to allow the user to select a text file, but it has to be a
text file with a name like "Slot45.txt". The number will vary, but it
has to start with "Slot" and have the ".txt".

Is this possible? I can get it to limit to text files, but is it
possible to limit the available files to only text files which start
with "Slot"?

The following works for me on Rev 2.7.2 on Windows
answer file "choose a file" with filter "Slots,slot*.txt"
- just shows .txt files beginning with 'slot' (case insensitive)

However, the same code using Rev 2.6.1 on Linux does not work - even
using with filter "JPG,*.jpg"
The whole filter string is inserted into the file selection dialog,
matching nothing.

I don't have a mac - donations welcome!


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to