answer file with type .pages & .numbers bundles

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 106
Joined: Thu Jun 07, 2007 1:30 am

answer file with type .pages & .numbers bundles

Post by tetsuo29 » Thu Aug 12, 2010 4:37 pm

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?

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: answer file with type .pages & .numbers bundles

Post by Klaus » Thu Aug 12, 2010 7:28 pm

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

tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 106
Joined: Thu Jun 07, 2007 1:30 am

Re: answer file with type .pages & .numbers bundles

Post by tetsuo29 » Fri Aug 13, 2010 4:06 am

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.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: answer file with type .pages & .numbers bundles

Post by Janschenkel » Fri Aug 13, 2010 6:02 am

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.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Post Reply