How to use references correctly

Hi community,

maybe this thread could serve as a container for all questions regarding references.

I have a general question about an editor for a node which has a reference to a second node. There are two ways of building an editor:
  1. (%referencedNode%->%refChild%)
    prettyPrint();
  2. (%referencedNode%->(%refChild%->{property}))
    prettyPrint();
Both editors work somehow. But during a discussion with Markus Völter, the argument came up whether the first variant should be used or not. The suggested reason for NOT using it, was that there the %refChild% node is rendered twice which may cause inconsitencies or undesired side effects.

Does anybody know if the first solution is valid or not?

Thank you very much in advance,
LaAck
1 comment
I'd also like to know that. Basically I use method 2. when possible. I've encountered side effects with method 1.
Maybe somebody from the MPS team can elaborate.

Regards
msch95
0

Please sign in to leave a comment.