[Developers] Creating an horizon from scratch

Kristofer Tingdahl kristofer.tingdahl at dgb-group.com
Thu Dec 13 04:01:32 CET 2007


Fernando J. Zunino skrev:
> Kristofer Tingdahl wrote:
>   
>> Dear Fernando,
>>     
>>> This approach works but it isn't what I want. I want to create an
>>> horizon from scratch, without specifying an existing horizon.
>>> I've tried creating a new Horizon2D instance but it didn't work as I
>>> expected:
>>>    EM::EMManager& em = EM::EMM();
>>>    EM::EMObject* emobj = EM::Horizon2D::create(em);
>>>    mDynamicCastGet(EM::Horizon*,h1,emobj)
>>>       
>> This should work. You should note that this horizon is in memory only,
>> i.e. it is not saved to disk. If you want to do save it, you have to
>> do the trick above with the uiIoObjSel. In what sense did it not work?
>>     
> The dynamic_cast is failing.
> In the previous example,
> emobj != NULL but after the execution of the dynamic_cast, h1 == NULL.
>   
What happens if you do mDynamicCastGet(EM::Horizon2D*,h1,emobj)?

Best regards,

Kristofer




More information about the Developers mailing list