Status: Accepted Owner: ---- Labels: Type-Defect Priority-Medium
New issue 794 by usman.bh...@gmail.com: More robust dynamicActions in MooseFinder http://code.google.com/p/moose-technology/issues/detail?id=794
Doru
When we clicked (to bring the menu) in Moose Finder we got list entity mooseInterestingEntity = to nil. So for now we patched the method to
[ :list | list entity mooseInterestingEntity ifNotNil: [:entity| entity mooseFinderActions ]].
buildBrowser browser := GLMFinder new. browser title: [:each | 'Moose Finder on ', each mooseInterestingEntity mooseDisplayString]. browser show: [ :a | a title: [ :each | (each mooseInterestingEntity mooseDisplayString contractTo: 30), ' (', each mooseInterestingEntity class name, ')' ]; dynamicActions: [ :list | list entity mooseInterestingEntity ifNotNil: [:entity| entity mooseFinderActions ]]. a dynamic display: [:each | | dynamic | dynamic := GLMCompositePresentation new. each mooseInterestingEntity mooseFinderPresentationsIn: dynamic. dynamic ]. a updateOn: MooseEntityAdded from: [:each | each isNil ifFalse: [each announcer] ifTrue: [nil] ]. a updateOn: MooseEntityRemoved from: [:each | each isNil ifFalse: [each announcer] ifTrue: [nil] ]. a updateOn: MooseEntityRenamed from: [:each | each isNil ifFalse: [each announcer] ifTrue: [nil] ]]. ^ browser
Comment #1 on issue 794 by tudor.gi...@gmail.com: More robust dynamicActions in MooseFinder http://code.google.com/p/moose-technology/issues/detail?id=794
I do not see how this happened. Could you reproduce the problem without the patch?
Updates: Status: WontFix Labels: Component-Finder Component-Glamour
Comment #2 on issue 794 by tudor.gi...@gmail.com: More robust dynamicActions in MooseFinder http://code.google.com/p/moose-technology/issues/detail?id=794
I checked and I really do not see how you would get an error in that block. Even if "list entity mooseInterestingEntity" is nil, the code should still work because mooseFinderActions is defined in Object.
Updates: Cc: andreho...@gmail.com
Comment #3 on issue 794 by usman.bh...@gmail.com: More robust dynamicActions in MooseFinder http://code.google.com/p/moose-technology/issues/detail?id=794
The problem appears only when you add a new entity in a moose model and the meta-model is not reset. Since the the new entity is unknown to the meta model, each mooseInterestingEntity returns nil for the new entity. So yes, the problem is independent of glamour actions.
Probably that's something like a domain specific rule for moose that Andre can include in his study for domain specific rules :-).