• 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: Explicit run handler usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Explicit run handler usage


  • Subject: Re: Explicit run handler usage
  • From: "email@hidden" <email@hidden>
  • Date: Sun, 18 Apr 2010 13:17:21 +0100


On 18 Apr 2010, at 03:29, Shane Stanley wrote:


When you use "tell myTasker to run", I suspect Cocoa is baulking at the AS
keyword. The correct usage would probably be "tell myTasker to |run|()". In
fact, you could make it a class call rather than an instance call and use:
"current application's myTask's |run|()" -- a form that won't even compile
without the pipes, suggesting it's not really legal.

But even with the pipes in the call, it won't work unless you also add the
pipes to the handler itself -- Cocoa just doesn't seem to see a normal run
handler as a method: +[myTask run]: unrecognized selector sent to class
0x20091e3a0. The same goes for idle, open, etc.

I think this behaviour can be explained by the fact that AS handler calls
utilise the ascr/psbr event. The run handler is different and responds to
aevt/oapp. Putting the pipes on makes it look like a regular handler.

So even in regular AS the run handler is really a different animal to any other handler.

Regards

Jonathan Mitchell

Developer
http://www.mugginsoft.com
 _______________________________________________
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

References: 
 >Re: Explicit run handler usage (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Compiling ASOC
  • Next by Date: Re: Compiling ASOC
  • Previous by thread: Re: Explicit run handler usage
  • Next by thread: Re: Explicit run handler usage
  • Index(es):
    • Date
    • Thread