On Sep 30, 2008, at 6:59 AM, Adam Roben wrote: > On Sep 29, 2008, at 12:58 PM, Jason Hullinger wrote: > >> (reply all this time) >> >> Well, it looks like stringByEvaluatingJavaScriptFromString is >> calling: JSC::JSValue* scriptExecutionResult = coreFrame->loader()- >> >executeScript(WebCore::String(script), true); The problem, I >> believe, is that coreFrame (an IWebFrame) is not set to a value >> because I'm not using an actual frame, or view of any kind. Does >> anyone know if there is a similar way as a Windows app to do the >> same as in Cocoa? > > I think you may need to call IWebView::initWithFrame before > stringByEvaluatingJavaScriptFromString will work. I'm surprised that > isn't required on OS X as well.
It works on the Mac because when you allocate a WebView using [[WebView alloc] init], the NSView implementation of -init will call into -initWithFrame:. If you *don't* call -init, you would need to call -initWithFrame: or -initWithFrame:frameName:groupName: on the WebView to initialize it before you could make use of it. - Mark _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

