helene can you send the cs file? On Sep 21, 2012, at 10:26 PM, Helene Bilbo wrote:
Hi, i still have problems with a Morph that should accept files from the OS dragged and dropped onto it. I found out it works in Pharo 1.2 and in Squeak 4.3 but not in Pharo 1.3 and 1.4. Try this class:
Morph subclass: #DropZone instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'DragAndDrop'!
!DropZone methodsFor: 'as yet unclassified' stamp: 'HeleneBilbo 9/21/2012 20:53'! dropFiles: evt self color: Color blue.! !
!DropZone methodsFor: 'as yet unclassified' stamp: 'HeleneBilbo 9/21/2012 20:41'! initialize super initialize. color := Color red. bounds := 0 @ 0 extent: 200 @ 200! !
!DropZone methodsFor: 'as yet unclassified' stamp: 'HeleneBilbo 9/21/2012 20:53'! wantsDropFiles: anEvent ^ true! !
In Pharo 1.3 and 1.4 the DropZone Morph does only in some rare cases catch the dropped file, in most cases it's the PastUpMorph behind, that get's to handle the dropped file. In Pharo 1.2 and in Squeak (4.3) it works as it should, i.e. the DropZone always get's to handle the file dropped onto it.
Perhaps someone has an idea what changed between 1.2 and 1.3 that could cause this behavior?
Best regards, Helene.
-- View this message in context: http://forum.world.st/Problems-with-a-Morph-that-accepts-File-Dropping-in-Ph... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.