[Cuis] Morphic drag and drop

H. Hirzel hannes.hirzel at gmail.com
Tue Jan 22 08:09:18 CST 2013


P.S. Instance variable 'worldState' of the PasteUpMorph is nil.

This is cause by the call to
   mouseButton2Activity

and that activates

invokeWorldMenu
	"Put up the world menu, triggered by the passed-in event.
	Perhaps a good place to disable it if needed"

	| menu |
	menu _ (TheWorldMenu new
		world: self
		hand: self activeHand) buildWorldMenu.
	menu addTitle: Preferences desktopMenuTitle.
	menu popUpInWorld: self


This should only be done for the World PasteUpMorph and not for a
PasteUpMorph which is a submorph of the WorldMorph


So if I subclass

PasteUpMorph subclass: PasteUpMorphHH

and do the same test as mentioned in the initial mail of this thread I
no longer do have walkbacks.


Note aside:

PasteUpMorphHH does not appear in the WorldMenu / New morph chooser.

I have to open it with PasteUpMorphHH new openInWorld


--Hannes


On 1/22/13, H. Hirzel <hannes.hirzel at gmail.com> wrote:
> Correction: I did the test of the previous email in an 4.1-1561 image.
>
> When doing the same thing 4.1-1572 the EllipseMorph sticks and I can
> move the PasteUpMorph around.
>
> However there is still another error:
>
> Clicking on the PasteUpMorph brings up several Debugger windows and
> the image freezes.
>
> See screen shot.
>
> --Hannes
>
>
>
> On 1/22/13, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>> Hello Juan
>>
>> I saw that you had done drag and drop fixes a day ago.
>>
>> https://github.com/jvuletich/Cuis/tree/master/UpdatesSinceLastRelease
>>
>> Updates 1562 to 1572
>>
>> A drag and drop question
>>
>> I create a PasteUpMorph by choosing the World menu 'New
>> morph'/'Worlds'/'PasteUpMorph'.
>>
>> Then I create a basic Morph, e.g. an EllipseMorph and drop it to the
>> PasteUpMorph. It does not stick though the menu of the PasteUpMorph
>> has 'accept drops' checked. (see screen shot).
>>
>> Regards
>> Hannes
>>
>




More information about the Cuis mailing list