Skip to Content
author's profile photo Former Member
Former Member

Attributes iteration of a value node bound to a structure invalid?

A context value node bound to a structure always delivers all attributes of the structure bound instead of the attributes, which were selected from the available structure attributes.

For example, if structure S has the attributes A, B and C and the value node V is bound to S, but "inherits" attribute A only, the code


delivers an iterator which loops 3 times and returns A, B and C as attribute infos.

Is this a wanted behaviour? I would expect that only the attributes, which are bound to the corresponding structure attributes (A in the sample) are returned.



Just to be a little bit more accurate: the term "structure" means a complex type defined unter "Structures" in the "Local Dictionary" for example. Attributes and nodes are Value Attributes/Nodes.

Message was edited by: Stefan Klensch

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    Posted on Aug 05, 2004 at 10:59 AM

    Yes, it is the intended behaviour. These <i>are</i> the attributes at run time. And I don't see why the additional structure attributes should be hidden from the application (besides the fact that iterateAttributes() is used internally, too).

    If you are interested whether an attribute was originally declared or was automatically added due to the structure binding, look at IWDAttributeInfo.isDeclared().

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Uwe. In the API documentation of isDeclared() the automatic adding is described already, i haven't seen this so far...

      iterateAttributes() is part of the IWDNodeInfo API, so if it's for internal use only, it should not exist there.