• 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: Christopher Nebel <email@hidden>
  • Date: Tue, 7 Dec 2004 21:42:35 -0800

On Dec 7, 2004, at 7:32 PM, Sander Tekelenburg wrote:

What I cannot envision though is a practical application for [parsing an object specifier] :) Exactly
when do you deal with an object whose parents you do not know but need to know? Would anyone care to post an example please?

Well, I mentioned that this had come up earlier today, so here's how it did:


You can think of a bookmark in Xcode as essentially an object specifier: characters 42 through 137 of file reference "Foo.m" of project "Potrzebie", say. (In reality, they also have a name, but that's not important here.)

The engineer I was discussing this with thought it might be useful to be able to go to the same location in a different file -- say you had two data files with similar formats but different contents. Given a bookmark to the right location in one file, how would you do this? If you could parse object specifiers, you could tear off the 'characters 42 through 137' part of the original bookmark, and then compose it with 'file reference "Bar.m"', giving you 'characters 42 through 137 of file reference "Bar.m"'. Presto!

This is not the parentage question originally asked, but it is a use for specifiers as decomposable objects.


--Chris Nebel AppleScript Engineering _______________________________________________ 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
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>)
 >Re: Unwinding the containment hierarchy of a reference (From: Chris Espinosa <email@hidden>)
 >Re: Unwinding the containment hierarchy of a reference (From: Michelle Steiner <email@hidden>)
 >Re: Unwinding the containment hierarchy of a reference (From: Sander Tekelenburg <email@hidden>)

  • Prev by Date: Re: Smile and FruitMenu
  • Next by Date: Re: Unwinding the containment hierarchy of a reference
  • 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