• 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: Script commands and the application object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script commands and the application object


  • Subject: Re: Script commands and the application object
  • From: Brian Webster <email@hidden>
  • Date: Wed, 20 Mar 2002 09:20:13 -0600

On Wednesday, March 20, 2002, at 03:40 AM, email@hidden wrote:

The only objection I have is that I'd like my app *delegate* to be declaring this method, the same way I have it handling my key-value coding using application:delegateHandlesKey:. But I can't find any way to do this; it seems like my delegate has no way of getting in the loop for script commands. I don't really like having this stuff in my NSApplication subclass; it just has to talk to the delegate to get any of its work done anyway.
Is there a mechanism I'm missing that allows me to do this? I've been combing the doc for one, but it's not jumping out at me...

I don't believe there's a public mechanism for this, although if you dug around in AppKit with class-dump for long enough, you could probably find some private method to override. Not that I'd advise that... ;-) Or I suppose you could set up some message forwarding scheme in your NSApplication subclass to handle it. Still not too pretty.

Oh, and by the way: my command has no arguments, but I can't get Script Editor to stop displaying it as "timedCopyImage reference -- the object for the command". Invoking it simply as "tell application 'Constrictor' timedCopyImage end tell" works fine, it really has no argument. Why is Script Editor doing this? Is this a bug, or a subtlety of AS I'm ignorant of?

I'd classify this as a bug. Or maybe it's a "feature", like the multiple application classes in the scripting dictionary.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.

References: 
 >Script commands and the application object (From: email@hidden)

  • Prev by Date: Re: Further scripting mysteries
  • Next by Date: NSThread
  • Previous by thread: Script commands and the application object
  • Next by thread: Re: Script commands and the application object
  • Index(es):
    • Date
    • Thread