Page 1 of 1
answer file with type .pages & .numbers bundles
Posted: Thu Aug 12, 2010 4:37 pm
by tetsuo29
I'm using the following to allow the user to select .csv or .tab files:
Code: Select all
answer file "Select a .csv or a .tab file:" with type "Comma Separated Values|csv,tab"
It works great except for the fact that iWork documents are now bundles (i.e. they are unix directories) similar to application bundles. This means that any .pages or .numbers files that are actually directories are now selectable in my compiled standalone.
Is there any work around for this in the current rev? Or, will it take an update to get rev's answer file to also know that .pages and .numbers directories should be treated like application bundles for the answer file dialog?
Re: answer file with type .pages & .numbers bundles
Posted: Thu Aug 12, 2010 7:28 pm
by Klaus
Hi Tetsuo (Konichi-wa?)
There is no workaround unfortunately!
And I do not think that Rev will support this in the next update.
What's even stranger, in OS X 10.6 pages and number documents do not appear as folders anymore!
You can select them right away with a simple "answer file..."
God knows how they will behave in the next OS X update? :-/
Best from germany
Klaus
Re: answer file with type .pages & .numbers bundles
Posted: Fri Aug 13, 2010 4:06 am
by tetsuo29
Hi Klaus,
I'm not Japanese, just a fan of the old school anime classic "Akira".
So, as follow up to my earlier question, since a .pages or a .numbers "file" is returned as the path from the answer file command, but they are actually directories, is there some way to test a path to see if it is a file or a folder? I keep thinking there must be, but if there is, I'm obviously not thinking of the right search terms in the Rev Dictionary, or on the forums, or on the mailing list. Thanks in advance for any help or advice.
Re: answer file with type .pages & .numbers bundles
Posted: Fri Aug 13, 2010 6:02 am
by Janschenkel
Check out the dictionary entry for
'there is a'.
Code: Select all
on mouseUp
answer file "Select a file"
if the result is "Cancel" then exit mouseUp
if there is a folder it then
answer it & return & "is a folder in disguise!"
else if there is a file it then
answer it & return & "is a plain file."
else
answer it & return & "is a mistery and you shouldn't see this?"
end if
end mouseUp
HTH,
Jan Schenkel.