realbasic-plugins
[Top] [All Lists]

Re: WebKit plugin

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: WebKit plugin
From: Alex Fischer <alex at basasoft dot com>
Date: Thu, 12 May 2005 17:52:41 +0200
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BEA8F1BE dot C9E7%vanhoek at mac dot com>
Hi Alfred:

Thanks for your quick answer. I will go through your code and answer as soon as I have seen how it works.

Regards

Alex

On May 12, 2005, at 17:42 , Alfred Van Hoek wrote:

on 5/12/05 10:55 AM, Alex Fischer at alex at basasoft dot com wrote:


Tried to send it to the view with
"SendEventToEventTargetWithOptions" but this produces a crash. Seems
logic as it probably produces a infinite loop.

Any ideas?


Could be that SendEventToEventTargetWithOptions should not be used, instead
try something like one or both of below functions, or adapt
SendEventToEventTargetWithOptions:

//used in the mousedown behavior function
static void _SendEventControlHitTest(REALcontrolInstance instance, Point pt)
{
    ControlData(MyDefinition, instance, MyData, me);

    EventRef theEvent;
    CreateEvent(NULL, kEventClassControl, kEventControlHitTest, 0, 0,
&theEvent);
SetEventParameter(theEvent, kEventParamDirectObject, typeControlRef,
sizeof(ControlRef), &me->mHIViewRef);
    SetEventParameter(theEvent, kEventParamMouseLocation, typeQDPoint,
sizeof(pt), &pt);
SendEventToEventTarget(theEvent, GetControlEventTarget(me- >mHIViewRef));
    ReleaseEvent(theEvent);
}

//used in the mousedown behavior function
static void _SendEventControlTrack(REALcontrolInstance instance, Point pt)
{
    ControlData(MyDefinition, instance, MyData, me);

    EventRef theEvent;
    CreateEvent(NULL, kEventClassControl, kEventControlTrack, 0, 0,
&theEvent);
SetEventParameter(theEvent, kEventParamDirectObject, typeControlRef,
sizeof(ControlRef), &me->mHIViewRef);
    SetEventParameter(theEvent, kEventParamMouseLocation, typeQDPoint,
sizeof(pt), &pt);
SendEventToEventTarget(theEvent, GetControlEventTarget(me- >mHIViewRef));
    ReleaseEvent(theEvent);
}

Alfred

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>