Skip to content

automatic / computed references between dependent entities #1972

Answered by antondomratchev
BrianHung asked this question in Q&A
Discussion options

You must be logged in to vote

A bit confused where you see a map of references not at the root level. Are you talking about the computed list

My apologies I was looking at the first example of the code you provided. Where Table model was defining rows as a property.

How would you proxy the action to the parent in MST? I used unprotect as I thought subtrees cannot directly modify its parents by default.

You can use something like getRoot(self).addRow(self.id, row) this code assumes that current model is attached to the root node and the root node has a addRowaction. I tend to sprinkle a root

get root() {
  return getRoot(self);
}

view across my child models because i often dive to the root of the tree and traverse…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@BrianHung
Comment options

@antondomratchev
Comment options

@BrianHung
Comment options

@antondomratchev
Comment options

Answer selected by coolsoftwaretyler
@BrianHung
Comment options

@antondomratchev
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants