How to ask if there is a appBundle?

Ken Ray kray at sonsothunder.com
Sun Dec 14 16:42:50 EST 2008



> When verifying a bundle on the Mac with "if there is a file" I get false -
> which is comprehensible, but same with "if there is a folder". So there must
> be another way. How do I ask for a bundle?

"There is a folder" should work, but you need to make sure you pass the
extension (.app, .bundle, etc.), even if it's not displayed. Here's an
example (I picked TextEdit, but pick what you like):

on mouseUp
  answer file "Select a bundle or app:"
  if it <> "" then
    put (there is a folder it)
  end if
end mouseUp

As you can see, you need to use "answer file" to pick a bundle, but after
that, it should be treated as a folder.

HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list