Re: Getting WebView and JavaScript to communicate. MFC can do it.
Re: Getting WebView and JavaScript to communicate. MFC can do it.
- Subject: Re: Getting WebView and JavaScript to communicate. MFC can do it.
- From: "Theodore H. Smith" <email@hidden>
- Date: Wed, 11 Jan 2006 20:33:25 +0000
On 11 Jan 2006, at 15:31, Daniel Jalkut wrote:
It's true that the connection has to be made from the Cocoa side,
but once it's done, the JavaScript itself has access to the cocoa
object. It works something like this:
[myScriptObject setValue:myCoolObject forKey:@"coolCocoaObject"];
Now from this point forward your javascript inside the webview can
do something like this:
myCoolObject.DoCoolStuff();
It's a little more complicated for methods with arguments, because
there is some automatic name changes to get around the problematic
(?) colons in ObjC selectors.
That sounds fantastic. Even better than MFC!
But where is it documented??? It's not on CocoaDev.com and it's not
documented in Apple's docs how to do this.
Just one compilable example project would be fantastic.
_______________________________________________
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