on 02-02-2007 10:40 AM
Hi,
I would like to change the type of a static context attribute in runtime.
I tried to delete the attribute and add a new one with the correct type and the same name than the deleted one but as it is static it wasn't possible to do so.
I could also create the attribute dynamic and then it would be possible to delete it, but isn't there a better solution to change an attribute type?
Kind Regards,
Maximilian
Hi Maximilian,
You cannot change the type of a statically defined context attribute. You can define the node with all static attributes except the changeable one, and then during runtime you can add it according to the desired type. Such a dynamic attribute may be removed and redefined later. This is not possible with statically defined attributes. Please take into account that removing attributes from the nodeInfo will invalidate all node instances based on this nodeInfo.
Ciao, Regina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you could use the infonode where the attribute is stored and do the get_attribute()
later on you change the attribute type_name type_id in the local object, delete and
set the attribute object and it's changed, maybe by changing it there it's allready done
grtz
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
but get_attribute doesn't return a reference but a describing attribute_info-structure.
How can changes there effect the actual attribute object?
And as i mentioned deleting the static attribute only results in an exception.
Is it possible to get a reference to the attribute object itself and change its parameters?
Regards,
Maximilian
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.