[webkit-dev] Win32 App

Jason Hullinger sshjason at gmail.com
Tue Sep 30 13:48:46 PDT 2008


So it does seem possible to initWithFrame with some sort of default values I
assume? I've tried to initWithFrame({0, 0, 0, 0}, L"", L""); (or a RECT with
the same values) , but it fails at run time.

Thanks,

~/Jason Hullinger

On Tue, Sep 30, 2008 at 1:44 PM, Mark Rowe <mrowe at apple.com> wrote:

>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080930/88be5e83/attachment.html 


More information about the webkit-dev mailing list