• 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: AppleScipt & Cocoa, argh! I can't get it to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScipt & Cocoa, argh! I can't get it to work


  • Subject: Re: AppleScipt & Cocoa, argh! I can't get it to work
  • From: Greg Titus <email@hidden>
  • Date: Thu, 11 Apr 2002 16:53:34 -0700

On Thursday, April 11, 2002, at 02:50 PM, Nat! wrote:
Something can't be right. It looks like the object MUST be aware of it's container to be able to produce the NSScriptObjectSpecifier. The object must know the key it is accessed with in the container class ? Ugh! This can't be true! Sketch unfortunately just looks the same to me and doesn't help.

Yep. That's exactly right. To produce a specifier of where the object is, the object has to know where it is. :-)

As my next block in the road I found and stalled at "toOneRelationships". I just created another class called OtherStuff, just the same as Stuff. I put a "ToOneRelationship" "otherstuff" on Application and tried:

tell application "AppleScriptTest"
set x to otherstuff
printa x
end tell

The Yield is this strange happening (Direct Parameter ???):

2002-04-11 23:37:35.194 AppleScriptTest[373] -> Execute Command: XXX.Printa
Direct Parameter: 1867806054
Receivers: (null)
Arguments: {}
2002-04-11 23:37:35.194 AppleScriptTest[373] <- (null):(null)

Well, maybe this will lend insight:

1867806054 decimal is equal to 'oTuf', your code for the otherstuff relationship.

So the receiver is your NSApp (the null specifier), and the direct parameter is your relationship. What happens when you implement a subclass of NSScriptCommand for 'printa', and ask it for its -evaluatedReceivers?

Personally, I have mostly avoided to-one relationships, so I can't help you more than that...

--Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: AppleScipt & Cocoa, argh! I can't get it to work
      • From: Nat! <email@hidden>
References: 
 >Re: AppleScipt & Cocoa, argh! I can't get it to work (From: Nat! <email@hidden>)

  • Prev by Date: Re: Problem linking to zlib
  • Next by Date: ever felt like a complete BONZO??
  • Previous by thread: Re: AppleScipt & Cocoa, argh! I can't get it to work
  • Next by thread: Re: AppleScipt & Cocoa, argh! I can't get it to work
  • Index(es):
    • Date
    • Thread