Hi,
roassal views have a nice feature in glamour - a new glamour pane is opened when an entity is clicked. This is being set up by:
aView raw allElementsDo: [:each | each on: ROMouseClick do: [:event | self selection: each model ]] ].
in GLMRoassalPresentation>>renderOn:.
I’d like to know if there is a possibility to do it yourself, because I generate some nodes dynamically when view is already displayed.
Cheers. Uko
Yuriy Tymchuk wrote:
Hi,
roassal views have a nice feature in glamour - a new glamour pane is opened when an entity is clicked. This is being set up by:
aView raw allElementsDo: [:each | each on: ROMouseClick do: [:event | self selection: each model ]] ].
in GLMRoassalPresentation>>renderOn:.
I’d like to know if there is a possibility to do it yourself, because I generate some nodes dynamically when view is already displayed.
Cheers. Uko _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
A bit of a hack and only a quick pass at the concept, but one way to do this might be...
ROView subclass: YourROView instanceVariableNames: 'allElementsBlock' classVariableNames: '' poolDictionaries: '' category: 'YourApplication'
YourROView>>allElementsDo: aBlock super allElementsDo: aBlock. allElementsBlock := aBlock.
YourROView>>add: element super add: element. allElementsBlock ifNotNil: [ allElementsBlock value: element ].
This requires Glamour to be able to use YourROView instead of ROMondrianViewBuilder. This facility is provided by loading the following packages attached to comment #9 of Issue 900 [1] [1] https://code.google.com/p/moose-technology/issues/detail?id=900 (Note you probably only need to read down from comment #7)
btw, I'm not sure #newViewBlock is the best method name. Any ideas for naming?
cheers -ben