Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregations: #object vs. #objects #313

Open
marceltaeumel opened this issue Oct 22, 2020 · 0 comments
Open

Aggregations: #object vs. #objects #313

marceltaeumel opened this issue Oct 22, 2020 · 0 comments
Labels

Comments

@marceltaeumel
Copy link
Contributor

marceltaeumel commented Oct 22, 2020

Until now, #objects in a model node is just used via #inputForChildren when computing the node's children. While it might be useful to also expose that in panes -- such as when selecting a model node -- it will confuse the user because a simple #asGroups would yield group contents instead of the group's representative.

That's why I already discarded the following idea:

ViPane >> notifyChangedSelection: selectedNodes
  "..."
	self
		setProperty: #lastSelection
		toValue: (selectedNodes gather: [:node |
			node isDictionary
				flag: #aggregation; "mt: See ViModelNode >> #inputForChildren. Support aggregation."
				ifTrue: [node at: #objects ifAbsent: [(node at: #object ifAbsent: [nil]) wrapList]]
				ifFalse: [node value wrapList]]) asArray.
  "..."

Let's better use #object instead, which the user can easily set to a group's contents instead of its representative while still using the representative for #text, #icon, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant