Re: [Pharo-users] Another question about Spec

2016-02-04 Thread Julien Delplanque
Ok, I just tried what you said and it does not always works since it is possible to drag an item from the list without selecting it... Julien On 04/02/16 17:42, Julien Delplanque wrote: Oh, I realize I didn't read your mail correctly, I'm sorry. I will try this trick. Julien On 04/02/16 16:5

Re: [Pharo-users] Another question about Spec

2016-02-04 Thread Julien Delplanque
Oh, I realize I didn't read your mail correctly, I'm sorry. I will try this trick. Julien On 04/02/16 16:55, Johan Fabry wrote: I don’t know the details of drag and drop, but it seems that you get the source widget as well as an argument of the block. From there you can get the selectedItem,

Re: [Pharo-users] Another question about Spec

2016-02-04 Thread Julien Delplanque
I understand what you say but sadly, it will not work in my case because: - I use #displayBlock: - Two or more items may be different objects but the result of the display block is the same. So I can't just use the string to retrieve the item in the list... :( Julien On 04/02/16 16:55

Re: [Pharo-users] Another question about Spec

2016-02-04 Thread Johan Fabry
I don’t know the details of drag and drop, but it seems that you get the source widget as well as an argument of the block. From there you can get the selectedItem, which should be the one that you are dragging I suppose. Can you confirm that this works? > On Feb 4, 2016, at 04:38, Julien Delp

[Pharo-users] Another question about Spec

2016-02-03 Thread Julien Delplanque
Hey, I use drag and drop between two lists in a project and I read this tutorial [1] to learn how to do it. My question is: Is there a way to have another object than a String as passengers in #acceptDropBlock: (I get passengers the same way as in the tutorial i.e sending #passenger to trans