• 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
[cocoa scripting] default sub container
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cocoa scripting] default sub container


  • Subject: [cocoa scripting] default sub container
  • From: Ken Victor <email@hidden>
  • Date: Mon, 5 Sep 2005 09:49:19 -0700

i have a multi doc application. however, the vast majority of the time only one document will be open at a time. by default, most scripts must thus be like:

tell application "myApp"
	tell document 1
		<commands>
	end tell
end tell

i (think i) would like to be able to write scripts more like:

tell application "myApp"
	<commands>
end tell

ie, not need to specify the document, and if there is only one document, then pass along the commands to that document; but if there is more than one document open, then return an appropriate error.

2 questions:

1) is this possible?
2) and if this is possible, is it a good idea?

i can make this happen by "replicating" all the elements/properties/commands of my document in my sdef file as elements/properties/commands of the application, but i don't want to do this--at least not in a user visible way. so i think this might be doable by subclassing NSScriptSuiteRegistry and NSScriptClassDescription. is that correct?

thanx for any thoughts and/or suggestions.
ken
_______________________________________________
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: [cocoa scripting] default sub container
      • From: Bill Cheeseman <email@hidden>
    • Re: [cocoa scripting] default sub container
      • From: Annard Brouwer <email@hidden>
  • Prev by Date: Core Data : calling validation in awakeFromInsert problem ?
  • Next by Date: Beta Testers needed
  • Previous by thread: Re: Core Data : calling validation in awakeFromInsert problem ?
  • Next by thread: Re: [cocoa scripting] default sub container
  • Index(es):
    • Date
    • Thread