Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: WebKit as a ControlRef in Carbon CFM
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebKit as a ControlRef in Carbon CFM



On Nov 17, 2003, at 7:44 PM, Alexander Cohen wrote:

Hi, i need to implement my own HIWebViewCreate to get access to a subclass of WebView that i created in cocoa. Is there anything special going on in that routine that i should no about. My implementation is returning an invalid control handle each time. Im really doing nothing special. I have a obj-c class that has a super of WebView, no data, and an overloaded -(void)mouseDown. From the custom call that i write in my bundle to access this from Carbon, i just alloc my new subclass, send it an init message, and assign my object to a pointer to a HIViewRef that i pass. This shiould work right?

No... I don't think that will work.

A HIViewRef is the same as a NSView*? I always get an invalid control, what might i be doing wrong?

I don't think this is true. The HIViewRef that you get back from HIWebViewCreate is not a direct pointer to the NSView. It is an opaque data structure whose contents are (by definition) not available to the programmer. My strong suspicion is that somewhere in that opaque HIView is a reference to the original NSView, but the HIViewRef and the NSView * are two different things.


I do not believe there is any way to create a subclass of a web view that you can get at from Carbon.

Scott
_______________________________________________
webkitsdk-dev mailing list | email@hidden
Help/Unsubscribe: http://www.lists.apple.com/mailman/listinfo/webkitsdk-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >WebKit as a ControlRef in Carbon CFM (From: Alexander Cohen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.