View of a node is null


I have a CanvasNode:GoSimpleNode, IGoCollapsible.

I need to access the view of this node, but it is always null.

Any help?


If a GoObject doesn’t belong to a GoView, its View property will be null. A GoObject is part of a GoView only if you Add it to one of the GoLayers owned by the view, rather than to a layer owned by a document.
If a GoObject belongs to a GoDocument (i.e. its Document property is non-null), it might be seen by more than one GoView, or perhaps by no GoViews.