• 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
How to return a list from a script command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to return a list from a script command


  • Subject: How to return a list from a script command
  • From: Bill Cheeseman <email@hidden>
  • Date: Sat, 03 Sep 2005 10:23:51 -0400

My Cocoa subclass of NSScriptCommand represents an AppleScript command that
returns a list. I therefore return an array of script object specifiers from
my override of -performDefaultImplementation. My sdef file defines a command
result of <type type="specifier" list="yes">. The command works when used in
a script, except that the list it returns contains only the first element of
many in the array.

The same thing happens when I return an array of the actual objects
(evaluated specifiers), and define the result type as <type type="mytype"
list="yes"> in the sdef file.

What should I do to make the command return the complete contents of the
array?

(Ken Victor asked essentially the same question on Cocoa-Dev a couple of
weeks ago and received no response.)

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


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

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to return a list from a script command
      • From: Pascal Pochet <email@hidden>
  • Prev by Date: NSRangeSpecifier error with startSpecifier's container
  • Next by Date: Re: Dictionary? Array? or other
  • Previous by thread: NSRangeSpecifier error with startSpecifier's container
  • Next by thread: Re: How to return a list from a script command
  • Index(es):
    • Date
    • Thread