Re: About moniker-based activation.



Hello Michael.

>         Ok - the trick is to aggregate a BonoboItemHandler to the Control
> - this means that during the moniker resolution process you have a
> 'GetObject' callback invoked in your code.
>
>         Jacob has a particularly neat handler in 'file-sel' to automate
> setting property bag properties this way.

>         HTH,


Yes,  it does help.

On the way I found a little bonobo bug in bonobo-item-handler.c.

The activation of the BonoboItemHandlerGetObjectFn get_object function
(through bonobo_marshal_BOXED__STRING_BOOLEAN_DUMMY_BOXED) passes a NULL
value for the "gpointer data" argument.  Clearly, it should pass
whatever "user_data" was registered in bonobo_item_handler_new.

In line 99 of bonobo-item-handler.c, I changed it to -

v_return = callback (data1,
		     (char*) g_value_get_string (param_values + 1),
		     g_value_get_boolean (param_values + 2),
		     data2,
		     g_value_get_boxed (param_values + 3),
		     NULL);

(Switching the places of the data2 and NULL arguments.
Perhaps now the NULL argument isn't needed anymore?)



tzuk






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