- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Ok, here's the next contribution to my soliloquy here:
Something else I stumbled over, that I find pretty confusing:
The BrowserNode-Object contains an enumeration of child nodes, plus a link to another object named BrowserNodeDefinition. The latter contains information about the appearance of the node in the browser such as BrowserNodeIcons, label and font (bold, strikethrough etc.). Just to point out again: The ChildNode-collection is a member of the BrowserNode-object, NOT of the linked BrowserNodeDefinition-object.
So, why does a newly created BrowserNode, that re-uses the definition of a previously created BrowserNode (i.e. its appearance) , contain all the subnodes of the the original node immediately upon creation?
So, in fact, the SubNode-collection appears to be a member of the BrowserNodeDefinition-Object and not of the BrowserNode-Object, although the structure of the API suggests something else.
I admit, that probably in most cases, the programmer that re-uses the BrowserNodeDefinition, does also want the SubNodes to appear again, as it most likely represents the same object. I did so too, but it took me a while to figure out why my code fails to create the subnodes again, as i did'nt expect them to show up automagically, due to the circumstances described above.