Deploying to Mac OS? Ask Mac OS specific questions here.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
Martin Koob
- VIP Livecode Opensource Backer

- Posts: 256
- Joined: Sun May 27, 2007 8:19 pm
Post
by Martin Koob » Sat Jan 12, 2008 4:45 pm
I am developing an application using Mac OS X 10.4 and am now testing the standalone on Leopard. My application has its own document type and the following code doesn't work in the standalone running under 10.5. (It works fine in Tiger)
Code: Select all
answer file "Select a file." with (the pdefault folder of stack "preferences") of type "XvLw" as sheet
The sheet does display and I can navigate to the folder containing my document but the document is greyed out and can't be selected. If I double click on the document from the finder it does open in the application correctly.
-
BvG
- VIP Livecode Opensource Backer

- Posts: 1239
- Joined: Sat Apr 08, 2006 1:10 pm
-
Contact:
Post
by BvG » Sat Jan 12, 2008 4:55 pm
The "answer file with filter|of type" form is deprecated, so i can't give you tips on that. I always use the "answer file with type" form, in your case like this:
Code: Select all
answer file "Select a file." with (the pdefault folder of stack "preferences") with type "Description|xml|XvLw" as sheet
where xml is a suffix (as in "file.xml"), and XvLw is a mac os file type. Note that mac os file types only work if the file actually has a resource fork (see the resfile keyword in the docu on how to set it).
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
Martin Koob
- VIP Livecode Opensource Backer

- Posts: 256
- Joined: Sun May 27, 2007 8:19 pm
Post
by Martin Koob » Sat Jan 12, 2008 5:14 pm
Thanks for the quick reply.
One further question about the type values. The first value you put is 'Description'. What is this used for and what should you put here.
I did not see the word 'Description' anywhere in the file dialog.
Is this text that I use to describe the type of file or is it a predetermined value for each type of file?
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Sat Jan 12, 2008 6:24 pm
Martin,
Try
Code: Select all
answer file "Select a file." with (the defaultFolder) with type "Description|xml|XvLw" or type "All files|*|*" as sheet
(Note that I'm using the defaultFolder for testing).
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
Martin Koob
- VIP Livecode Opensource Backer

- Posts: 256
- Joined: Sun May 27, 2007 8:19 pm
Post
by Martin Koob » Sat Jan 12, 2008 9:32 pm
Oh I see how that works.
If there is just the one type in the command it will not show anything in the file dialog.
if I have the two types then there is a pull down menu called 'Enable:' with the two options, in this case 'Description' and 'All files'
Thanks to both of you for your help on this.
Martin