• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: When is a size not a size?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When is a size not a size?


  • Subject: Re: When is a size not a size?
  • From: Andrew Oliver <email@hidden>
  • Date: Sun, 01 Jun 2003 17:59:41 -0700

'size' is a dictionary object that Interarchy uses to refer to the size of a
file.

If you look at Interarchy's dictionary:

Class file descriptor: describes a file location
Properties:
host string [r/o] -- host to connect to
path string [r/o] -- path to file
name string [r/o] -- file name
is directory boolean [r/o] -- is it a file or directory
size integer [r/o] -- size of the file
modification date [r/o] -- modification date?


So that explains case 3

Case 4 doesn't work because "me" doesn't know how do anything with a size,
so it passes it up the chain to Interarchy, which we already know thinks of
it as something different.

Case 5 is presumably because the Finder is smart enough to return the size
property of your list.

As to how to fix it, AppleScript provides for namespace conflicts using the
|name| construct:

get |size| of X --> should work no matter what app you're targeting.

Andrew
:)
On 6/1/03 5:22 PM, "Steve Cunningham" <email@hidden> wrote:

> Can any one enlighten me as to what could be going on here?
>
> property X : {size:100, other:500}
>
> -- Case 1
> get size of X --> 100
>
> -- Case 2
> tell application "Finder"
> get size of X --> 100
> end tell
>
> -- Case 3
> tell application "Interarchy"
> get size of X --> Can't get size of {size:100, other:500}.
> end tell
>
> -- Case 4
> tell application "Interarchy"
> tell me
> get size of X --> Can't get size of {size:100, other:500}.
> end tell
> end tell
>
> -- Case 5
> tell application "Interarchy"
> tell application "Finder"
> get size of X --> 100
> end tell
> end tell
>
>
> I don't understand why Case 3 doesn't work, much less why
> Case 4 doesn't... and then Case 5 does ?!???
>
> Waaaaah!
>
> Steve
> _______________________________________________
> 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.
_______________________________________________
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.

References: 
 >When is a size not a size? (From: Steve Cunningham <email@hidden>)

  • Prev by Date: When is a size not a size?
  • Next by Date: Re: When is a size not a size?
  • Previous by thread: When is a size not a size?
  • Next by thread: Re: When is a size not a size?
  • Index(es):
    • Date
    • Thread