I'm a bit confused about how to use the createElement() - methods in the DOM.
Please correct me, if I'm wrong, but I thought, you can create an element via this method, manipulate it, and then place it somewhere else (maybe even in another document).
Anyhow, this code won't work:
Code :... domShader_GLSL* newShaderGLSL = daeSafeCast<domShader_GLSL >( intoPass_GLSL->createElement(COLLADA_ELEMENT_SHADER) ); if (!newShaderGLSL->isAttributeSet("stage")) ...
This code crashes in the isAttributeSet()-check ... it seems like some members of the newly created daeElement are not correctly initialized and assertion fails while accessing _validAttributeArray[i]; in the method daeElement::isAttributeSet( daeString attrName ).
If I create the element with createAndPlace I don't get those troubles.
Is the createElement() element intended to be used like this at all?