spec-framework / spec

The code of Spec for Pharo
MIT License
16 stars 6 forks source link

In TreeModel>>acceptDropBlock: the block receives morphs as arguments #3

Closed tinchodias closed 10 years ago

tinchodias commented 10 years ago

You can reproduce with the example in class-side:

| m |

m := self new.
m openWithSpec.

m roots: #(a b c d).
m childrenBlock: [:it | it = #c 
    ifTrue: [ {1. 2. 3} ]
    ifFalse: [ {} ]].
m displayBlock: [:item | item isSymbol
    ifTrue: [ item asUppercase , ' symbol' ]
    ifFalse: [ item printString ]].
m 
    dragEnabled: true;
    dropEnabled: true;
    acceptDropBlock: [ :transfer :event :source :receiver |  self halt ].