I’m building a Dashboard Widget where I use a plugin on native code to handle certain operations.
The problem is one of those methods takes a few seconds and the interface freezes, so…
It’s there a way to do an Asynchronous method that can be called by the Javascript and then when it’s done, a callback is used?
So, a little more digging I found there is a method called callWebScriptMethod:withArguments: that allows me to do it Asynchronously.
More info here:
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/WebKit/Classes/WebScriptObject_Class/Reference/Reference.html#//apple_ref/doc/c_ref/WebScriptObject