• 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: KVC with an path, AppleScript and InterfaceBuilder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVC with an path, AppleScript and InterfaceBuilder


  • Subject: Re: KVC with an path, AppleScript and InterfaceBuilder
  • From: Dustin Voss <email@hidden>
  • Date: Tue, 24 Jan 2006 22:17:50 -0800

On 24 Jan 2006, at 7:52 AM, Thomas Engelmeier wrote:

Is there any well known magic for the following two tasks:
- validation - happens usually automatically with min / max values for Cocoa UI bindings?
- recordability for a KVC application - synthesize AppleEvents to self to allow recording?

It may not be a well-known trick, but recording is certainly possible. One of my partially-completed Cocoa apps supports recording. I've published few category methods so that other can also directly dispatch Apple Events easily.


Basically, you supply an Apple Event, a handler for the event (typically a sub-class of NSScriptCommand), and an NSInvocation to process the result.

My methods direct-dispatch the event to the app. The handler picks it up and acts on it. If the handler needs to suspend execution for network access or something, no problem, it just calls a resume method I supply when it is ready to send the result.

With or without suspending, my methods invoke the NSInvocation with the result or error. Also, the event can be sent with the don't- execute flag, in which case you don't need a handler and the NSInvocation is not invoked, though it is still recorded.

You can get the .zip file at http://homepage.mac.com/d.j.v./ FileSharing13.html.

_______________________________________________
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


References: 
 >Re: KVC with an path, AppleScript and InterfaceBuilder (From: Matt Neuburg <email@hidden>)
 >Re: KVC with an path, AppleScript and InterfaceBuilder (From: Thomas Engelmeier <email@hidden>)

  • Prev by Date: Re: How to find the fwrite() error
  • Next by Date: Re: Extracting Color components from NSColorWell
  • Previous by thread: Re: KVC with an path, AppleScript and InterfaceBuilder
  • Next by thread: Re: KVC with an path, AppleScript and InterfaceBuilder
  • Index(es):
    • Date
    • Thread