• 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: Unwinding the containment hierarchy of a reference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unwinding the containment hierarchy of a reference


  • Subject: Re: Unwinding the containment hierarchy of a reference
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 7 Dec 2004 17:22:12 -0800

On Dec 7, 2004, at 4:37 PM, Michelle Steiner wrote:

I'm still not 100% sure I understand what he's talking about.  Care to explain it, please?  Pretty please?  With sugar on top?

Some functions give you an object specifier, a "reference", to an object in the app.  And you may want to know what the containment chain — the specific containment chain displayed in AppleScript — for that object is, but the object may not have a property for its container.

The object specifier knows the containment chain. That's why AppleScript can display it the way it does, e.g. word 1 of paragraph 2 of document "foo".  So AppleScript has, at runtime, its grubby little mitts on all the information he wants.  There's just no built-in function to return, say, a list of objects (e.g. {word 1 of paragraph 2 of document "foo", paragraph 2 of document "foo", document "foo", application "TextEdit"})

One could write a scripting addition that takes an object specifier and returns a list.  Would take me a couple hours.  Don't have them now.  Neither does Nebel.  But it's v. straightforward.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Unwinding the containment hierarchy of a reference
      • From: Michelle Steiner <email@hidden>
References: 
 >Unwinding the containment hierarchy of a reference (From: "Scott Babcock" <email@hidden>)
 >Re: Unwinding the containment hierarchy of a reference (From: Christopher Nebel <email@hidden>)
 >Re: Unwinding the containment hierarchy of a reference (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: [OT] Re: Smile and FruitMenu
  • Next by Date: Re: [OT] Re: Smile and FruitMenu
  • Previous by thread: Re: Unwinding the containment hierarchy of a reference
  • Next by thread: Re: Unwinding the containment hierarchy of a reference
  • Index(es):
    • Date
    • Thread