• 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: Trying to create an sdef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to create an sdef


  • Subject: Re: Trying to create an sdef
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Thu, 07 Aug 2014 17:45:35 +0700

On 7 Aug 2014, at 14:22, Shane Stanley <email@hidden> wrote:

> On 7 Aug 2014, at 4:55 pm, Gerriet M. Denkmann <email@hidden> wrote:

I have an app (called App) which is NOT document based and has an app delegate called AppDelegate which implements  -application:delegateHandlesKey:.

This app shows a list of words,

It already understands scripts like: "set w3 to word 3" or "set nbrWords to count of words" etc.
(Thanks a lot to Shane!)

Now the AppDelegate also has a method: -(void)selectWordsContaining: (NSString *)s which results in not showing all words, but only those containing the given string.

And I want to write a script like:

tell application "App"
	selectWordsContaining "good"
end tell

But nothing happens, no output, no error message and my method is never called.
Obviously something is missing. But what?

The sdef is:

<suite name="App Suite" code="Apps" description="Classes just for the App application.">
	<class name="application" code="capp" description="The application class.">
		<cocoa class="NSApplication"/>

		<element type="word"  access="r">
			<cocoa key="wordsArray"/>
		</element>

		<responds-to name="selectWordsContaining">
			<cocoa method="selectWordsContaining:"/>
		</responds-to>
	</class>

	<class name="word" code="claL" description="One of our list of words">
 		<cocoa class="NSString"/>
	 	<type type="text"/>
	</class>

	<command name="selectWordsContaining" code="LaksLaks" description="Show only words containing...">
		<direct-parameter type="text" description="The string."/>
	</command>
</suite>


Gerriet.


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

This email sent to email@hidden


  • Follow-Ups:
    • Re: Trying to create an sdef
      • From: Shane Stanley <email@hidden>
References: 
 >Trying to create an sdef (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Trying to create an sdef (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Trying to create an sdef
  • Next by Date: Re: Trying to create an sdef
  • Previous by thread: Re: Trying to create an sdef
  • Next by thread: Re: Trying to create an sdef
  • Index(es):
    • Date
    • Thread