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)
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.
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:
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
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
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'