Re: Dynany
- From: Michael Meeks <michael ximian com>
- To: Chris Roberts <croberts bongle co uk>
- Cc: orbit <orbit-list gnome org>
- Subject: Re: Dynany
- Date: 19 Jun 2003 11:18:00 +0100
Hi Chris,
On Wed, 2003-06-18 at 13:04, Chris Roberts wrote:
> I'm trying to use Dynamic Any's. I snagged some code from bonobo-arg.c
> as per an email I found of Michael's on the net, but I can't get it to
> link or compile:
Ah ;-) I suspect you're a victim of the OMG changing the spec.
underneath you. You need to look at a recent
libbonobo/bonobo/bonobo-arg.c:
f = (DynamicAny_DynAnyFactory)
CORBA_ORB_resolve_initial_references (
bonobo_orb(), "DynAnyFactory", &ev);
g_return_val_if_fail (!BONOBO_EX (&ev), NULL);
dyn = DynamicAny_DynAnyFactory_create_dyn_any_from_type_code (
f, t, &ev);
Which sucks even more (of course ;-) so the whole thing is rather badly
complicated.
For simple cases I recommend using bonobo-arg.h itself; and for more
complex cases, building the value using a C structure / whatever, and
shoe-horning it into the any->_value.
> What's the correct way to create and use DynAny's?
Prolly to avoid it ;-) it's an over-engineered mess IMHO.
Regards,
Michael.
--
michael@ximian.com <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]