Re: Write a prefs file
Re: Write a prefs file
- Subject: Re: Write a prefs file
- From: JollyRoger <email@hidden>
- Date: Fri, 31 May 2002 06:37:23 -0500
On 5/30/2002 9:15 PM, "Christopher Nebel" <email@hidden> wrote:
>
On Thursday, May 30, 2002, at 05:49 PM, JollyRoger wrote:
>
>
> Heck, even all AppleScript applications (applets) have resource forks
>
> with
>
> many many resources in them.
>
>
Like I said, applets are currently an exception to the no-resource-forks
>
"rule". There's actually a bug filed on this.
Ok.
>
> I apologize ahead of time for contradicting you, Chris, but this is
>
> incorrect. ... In Mac OS X 10.1.4, Terminal.rsrc doesn't even have a
>
> data fork, and ONLY contains a resource fork with a single "aete"
>
> resource ID 2750.
>
>
OK, let's try a little experiment, because I'm also using 10.1.4, and
>
see something rather different. Fire up Terminal and try the following:
>
>
cd /Applications/Utilities/Terminal.app/Contents
>
wc -c Resources/Terminal.rsrc
>
wc -c Resources/Terminal.rsrc/..namedfork/rsrc
>
>
On my system, the first wc returns 3081; the second returns 0. I.e.,
>
the file is data fork only. For a further test, DeRez the file with no
>
options -- it complains that the resource fork is empty and
>
uninitialized. Add the -useDF option, and it works nicely, producing a
>
single aete resource with ID 0.
>
>
What do you see?
Hmm, I see exactly the same thing.
Ok now I see the source of my confusion. I assumed that because Resorcerer
opened these .rsrc files and showed me a list of resources, the files had no
data fork. I appears now that what Resorcerer was actually doing was
reading the data fork and displaying the resources as if they were in the
resource fork. Man, that's misleading!
I was wrong. You are correct in your entire post (with the small, trivial
exception of iTunes). I'll be posting this to the list shortly. I'm sorry
for the confusion. That's what I get for assuming!
I have been under the mistaken impression that flattening resource forks
meant converting them to multiple data files. If I can store all of my
resource files in the data fork of one file, and the Resource Manager can
read them the same way as before, there's no reason for me not to switch to
flattened resource files. This seems to be the case.
All of this is only partially relevant to the topic of the original message.
What is the preferred mechanism to use to write preferences files from
AppleScript?
Would it be possible, from Carbon Resource Manager APIs, to create flattened
resource files? (Might someone write a scripting addition that would allow
a script to create flattened resource files?)
JR
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.