How to open an XML file within an OSX bundle?

Keith Clarke keith.clarke at clarkeandclarke.co.uk
Wed Jun 20 13:04:42 EDT 2012


Thanks Colin & Klaus for your responses. 

This revised script works in the IDE to open the iPhoto plist XML file in LiveCode.

on mouseUp
   put empty into tFile
   put empty into field "Source File"
   put empty into field "Extract"
   answer file "Select File" as sheet
   put it into tFile
   put tFile into field "Source File"
   put "binfile:"&tFile&"/Contents/info.plist" into tTarget
   answer tTarget
   put URL tTarget into field "Extract"
end mouseUp 

However, when I try to apply this approach to a MindManager file (which Text Wrangler tells me is a package containing an XML file at /Users/Keith/My Maps/file.mmap/Document.xml) I can't extract the XML file directly. 

I also notice that setting Finder/Pathfinder option to 'Show Package Contents' doesn't reveal these files as package folders with contents. So, OSX seems to be treating packages posing as applications differently to packages posing as files.

There seems to be something preventing direct access to this 'file within a file'. So, I may have to use Apple Script to automate the extraction of raw text using Text Wrangler. Yuk, it's getting very ugly when I just wanted to rustle up a utility to access some data that's not included in the MindManager CSV export! :-(

Anyway, thanks for playing.
Best,
Keith..

On 20 Jun 2012, at 15:32, Klaus on-rev wrote:

> Hi Colin,
> 
> Am 20.06.2012 um 16:28 schrieb Colin Holgate:
> 
>> I believe we were talking just about on Mac, and it's uncommon, isn't it, for people to be on Mac and not have admin rights? I am able to read the plus file as a standalone app, but I haven't gone to the trouble of setting up a non-admin user to test what happens then.
> 
> ADMIN or not, you might need to take care of this :-)
> 
>> On Jun 20, 2012, at 9:20 AM, Klaus on-rev <klaus at major.on-rev.com> wrote:
>> 
>>> But maybe this is also a permission thing?
>>> I think you cannot access the app folder from another app if not logged in with ADMIN rights.
> 
> OTH I am not sure about this...
> 
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> http://www.major-k.de
> klaus at major.on-rev.com
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list