Updates:
Labels: -Type-Defect Type-Enhancement
Comment #1 on issue 769 by tudor.gi...(a)gmail.com: Glamour should support
drag and drop
http://code.google.com/p/moose-technology/issues/detail?id=769
A first version is implemented for listing presentations. However, there is
basically no test for this.
Here is an example:
GLMBasicExamples>>listDragAndDrop
"self new listDragAndDrop openOn: (1 to: 5) asOrderedCollection"
| browser |
browser := GLMTabulator new.
browser column: #source; column: #target.
browser transmit to: #source; andShow: [:a |
a list
title: 'Source';
display: (1 to: 10);
allowItemDrag: [:item :list | true ];
transformDraggedItem: [:item :list | item + 100 ]
].
browser transmit to: #target; andShow: [:a |
a list
title: 'Target';
display: [:collection | collection ];
allowDropOnItem: [:draggedObject :targetItem :list | draggedObject
isNumber ];
dropOnItem: [:draggedObject :targetItem :list |
list entity addLast: (targetItem + draggedObject).
list update.
true ]
].
^ browser