Status: New Owner: ---- Labels: Type-Enhancement Priority-Medium Component-Glamour
New issue 510 by tudor.gi...@gmail.com: Introduce Port>>transientValue: http://code.google.com/p/moose-technology/issues/detail?id=510
We should be able to set the value of a port only temporarily. This would be useful for triggering other transmissions. For example, to implement a search like behavior we could use the code from below. The problem is that if you press the search icon once, then change the selection manually, and then press the button again, the selection will not change because the #focusOne port did not change the value.
|browser | browser := GLMTabulator new. browser act: [:b | (b pane port: #focusOne) value: 3 ] icon: MooseIcons mooseSearch entitled: 'Search'. browser column: #one; column: #two. browser transmit to: #one; andShow: [ :a | a tree display: [:x | 1 to: x]]. browser transmit to: #two; from: #one; andShow: [ :a | a tree display: [:x | 1 to: x*2]]. browser transmit to: #one port: #selection; fromOutsidePort: #focusOne. browser openOn: 3
Comment #1 on issue 510 by tudor.gi...@gmail.com: Introduce Port>>transientValue: http://code.google.com/p/moose-technology/issues/detail?id=510
A possible more generic implementation could be to implement a Browser>>suspendTransmissionsWhile: [...].
Updates: Owner: tudor.gi...@gmail.com Labels: Milestone-4.4
Comment #2 on issue 510 by tudor.gi...@gmail.com: Introduce Port>>transientValue: http://code.google.com/p/moose-technology/issues/detail?id=510
Fixed. Using transientValue: in the search block solves the issue.
|browser | browser := GLMTabulator new. browser act: [:b | (b pane port: #focusOne) transientValue: 3 ] icon: MooseIcons mooseSearch entitled: 'Search'. browser column: #one; column: #two. browser transmit to: #one; andShow: [ :a | a tree display: [:x | 1 to: x]]. browser transmit to: #two; from: #one; andShow: [ :a | a tree display: [:x | 1 to: x*2]]. browser transmit to: #one port: #selection; fromOutsidePort: #focusOne. browser openOn: 3
Updates: Status: Fixed
Comment #3 on issue 510 by tudor.gi...@gmail.com: Introduce Port>>transientValue: http://code.google.com/p/moose-technology/issues/detail?id=510
(No comment was entered for this change.)