Re: Save a NSAppleScript to a file
Re: Save a NSAppleScript to a file
- Subject: Re: Save a NSAppleScript to a file
- From: p3consulting <email@hidden>
- Date: Sun, 23 Nov 2003 10:51:05 +0100
Hi list,
I created and compiled a NSAppleScript from a NSString.
Now I would like to save the NSAppleScript already compiled to a file
or to
store it within a NSMutableArray to save to a file .plist.
I can store the AS to the Array but then the array won't save.
Should I convert firstly the NSAppleScript to a NSData? If so, how to
do?
Saving the source code of the AppleScript in the NSArray as an NSString
is the simplest path.
NSAppleScript doesn't seem to adopt the NSCoder protocol so I don't see
any easy way to convert
the compiled data into an NSData object.
Unless you adopt some other AppleScript Cocoa framework like
http://homepage.mac.com/nathan_day/index.html
and
you will probably end up saving in a NSData the content of the
underlying AEDesc using [NSData dataWithBytes:length]
Pascal Pochet
P3 Consulting
email@hidden
http://www.p3-consulting.net
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.