[Ace-users] Re: [ciao-users] Invoking push_event on a component
Sowayan, Abdullah (N-DUA)
abdullah.sowayan at lmco.com
Sun Jul 15 11:58:21 CDT 2007
Santos,
>I'm trying to invoke the push_event method on a component using the
>following code changed from the Hello example:
>
>CORBA::Object_var obj = orb->string_to_object (ior);
>
>
>Components::EventConsumerBase_var consumer =
>Components::EventConsumerBase::_narrow(obj.in ());
>Hello::TimeOut_var event = new OBV_Hello::TimeOut;
>
>consumer->push_event(event);
>
>
>I'm getting the ior from a file. It happens that the "obj" is filled
right,
>but the "consumer" I'm getting has a null value. What I am doing wrong?
Hmmm, if after orb->string_to_object you get a CORBA::Object that is not
nil, and you try to narrow it to Components::EventConsumerBase and the
result is a nil object reference, that means that the object is not of
Components::EventConsumerBase type.
Thanks,
Abdul
More information about the Ace-users
mailing list