• 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: AppleScript create command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript create command


  • Subject: Re: AppleScript create command
  • From: Dustin Voss <email@hidden>
  • Date: Mon, 12 Jul 2004 11:07:03 -0700

On 12 Jul, 2004, at 9:06 AM, James J. Merkel wrote:

I'm writing my own create command and have made some progress, but have run up against a roadblock.
...
And the objectSpecifier is as follows (copied from previous posts on similar topics):

- (NSScriptObjectSpecifier *)objectSpecifier {
NSScriptObjectSpecifier *containerRef = [NSApp objectSpecifier];

return [[[NSIndexSpecifier alloc] initWithContainerClassDescription:[containerRef
keyClassDescription] containerSpecifier:containerRef key:@"metadata"
index:0] autorelease];
}

As shown in the console output, I am not able to use the AppleScript object in a get statement.
Also, I notice in Script Editor that I get: +class ; 1 shown after running the extract command. Not sure this is correct.
Anyone see what is wrong with what I have done?

Yeah, the -objectSpecifier method won't work properly. The object specifier for NSApp is actually nil. Try (NSScriptClassDescription *)[NSApp classDescription] instead of [containerRef keyClassDescription].
_______________________________________________
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: AppleScript create command
      • From: "James J. Merkel" <email@hidden>
References: 
 >AppleScript create command (From: "James J. Merkel" <email@hidden>)
 >Re: AppleScript create command (From: "James J. Merkel" <email@hidden>)

  • Prev by Date: Re: How to use the .strings files from the code?
  • Next by Date: Storing C objects (structs) in NS Containers?
  • Previous by thread: Re: AppleScript create command
  • Next by thread: Re: AppleScript create command
  • Index(es):
    • Date
    • Thread