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: Andrei Tchijov <email@hidden>
- Date: Wed, 11 Jan 2006 17:03:30 -0500
http://developer.apple.com/documentation/AppleApplications/Conceptual/
SafariJSProgTopics/Tasks/ObjCFromJavaScript.html#//apple_ref/doc/uid/
30001215
On Jan 11, 2006, at 4:53 PM, Theodore H. Smith wrote:
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();
I tried that.
It didn't work!
my setValue and valueForKey methods never got called :(
Also, I don't see this technique documented anywhere in Apple's
documentation. And it's not on CocoaDev.com?
Maybe I'm doing something wrong. Did you actually get this to work
yourself? If so, can I see a real world functioning example???
_______________________________________________
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
_______________________________________________
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