moz-bonobo-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [moz-bonobo-list] Calling javascript or changing the location from a


From: Jean Bréfort
Subject: Re: [moz-bonobo-list] Calling javascript or changing the location from a bonobo control
Date: 23 Mar 2004 11:51:31 +0100

Le mar 23/03/2004 à 10:22, Luca Padovani a écrit :
> Hi,
> 
> I've been playing with the notification mechanism to make the browser
> open a new page as s result of an event from a bonobo control. I've
> followed Jean's instruction farily closely. In the control factory I
> have
> 
> BonoboEventSource* evs = bonobo_event_source_new();
> bonobo_object_add_interface(BONOBO_OBJECT(control), BONOBO_OBJECT(evs));
> 
> then when an action should cause the browser to change page:
> (control_data is a record of data associated with the control)
> 
> BonoboObject* evs = bonobo_object_query_local_interface(
>   BONOBO_OBJECT(control_data->control),
>   "IDL:Bonobo/EventSource:1.0");
> if (evs != NULL)
>   {
>     BonoboArg* arg = bonobo_arg_new(BONOBO_ARG_STRING);
>     BONOBO_ARG_SET_STRING(arg, url);
>     bonobo_event_source_notify_listeners (evs, "URL", arg, NULL);
>     bonobo_arg_release(arg);
>     bonobo_object_unref(BONOBO_OBJECT(evs));
>   }
> 
> (url is a string with the URL to be opened).
> 
> The code is executed at the right time and with the right parameters,
> but unfortunately the browser does not react to the notification. I've
> also added EventSource among the implemented interfaces in the .server
> file for the control, nothing has changed (BTW, am I supposed to do
> this?)

It is not necessary. 

> My guess is I'm missing something obvious here, does anyone have any
> clue?

I don't see why it does not work either at first glance. May be
something was missing with my patch :-(.
I should probably do some debugging. I suppose the code is gtkmathview.
Is the cvs version at gnome.org uptodate? And can you provide a sample
file?

Regards,
Jean

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


reply via email to

[Prev in Thread] Current Thread [Next in Thread]