Re: Inconsistent results from Finder and System Events
Re: Inconsistent results from Finder and System Events
- Subject: Re: Inconsistent results from Finder and System Events
- From: Christopher Nebel <email@hidden>
- Date: Tue, 18 Nov 2003 16:07:07 -0800
On Nov 18, 2003, at 1:23 PM, Marc K. Myers wrote:
Looks like you haven't had a nibble on this one yet, Marc - so I'll
try and kick things off - by observing that the Finder returns the
value of 'capacity' as a double integer, while System Events returns
an unsigned integer...
OMM both System Events and Finder appear to return reals for capacity
and free space of disks. Or am I missing something?
Well, assuming the dictionary is telling the truth, that would explain
it -- the Panther version of System Events says "double integer".
"unsigned integer" is only 32 bits, which is only enough for 4 GB, and
obviously your disk is larger than that. Possible solutions: ask the
Finder, upgrade to Panther, or partition your disk into
smaller-than-4GB chunks. (Hey, it would work.)
The bit you're missing (and something I'm working to correct) is that
dictionaries tend to list Apple Event transport types (such as "double
integer", which, by the way, is a 64-bit integer), which are not quite
the same things as AppleScript types. Integers in AppleScript are 27
bits long; anything bigger than that (about 134M) gets turned into a
real on receipt.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.