From: Jeff W. <jww...@ya...> - 2004-09-23 00:55:15
|
Hiroo, I tried drag & drop for every possible combination of different window types. It appears to be working fine now. Jeff --- Hiroo Hayashi <hir...@co...> wrote: > From: Hiroo Hayashi <hir...@co...> > To: JSynthLib Development > <jsy...@li...> > Subject: Re: [Jsynthlib-devel] incompatible Scene > class > Date: Tue, 21 Sep 2004 20:29:22 -0500 > > Hi, > > Last night I checked in the various change for > drag&drop (cut&paster, > TransferHandler/Transferable) related code. > > The most important update is that now we can > drag&drop Scene and can > drag&drop Patch and Scene between a LibraryFrame and > a SceneFrame. This > has been a known bug for a long time. > > Hiroo> Jeff> I'm getting the following exception > when I try to drag > Hiroo> Jeff> a patch from a bank window to a library > window. Can > Hiroo> Jeff> anyone reproduce this? > Hiroo> > Hiroo> Hiroo> Yes, I can. I guess my bug fix made > this bug. I'll take a look. > > I also made a fix for this, but I don't understand > why the fix is > necessary. For example if I drag&drop a Patch from > a LibraryFrame to > another LibraryFrame, you will see the following > debug message if you > run JSynthLib with debug option ('2'). > > DBG>PatchListTransferHandler.createTransferable > [Roland TD6 Drumkit] f0 41 00 00 3f 12 41 62 00 00 > 41 63 75 53 74 69 .. 02 74 f7 > DBG>Patch.isDataFlavorSupported > java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=[Lcore.IPatch;] > DBG>Patch.getTransferData: > flavor=java.awt.datatransfer.DataFlavor[mimetype=application/x-java-serialized-object;representationclass=[Lcore.IPatch;] > DBG>Patch.getTransferData: Patch=[Roland TD6 > Drumkit] f0 41 00 00 3f 12 41 62 00 00 41 63 75 53 > 74 69 .. 02 74 f7, MIDI-OX > DBG>PatchTransferHandler.importData: > t=java.awt.dnd.DropTargetContext$TransferableProxy@57828d > DBG>PatchTransferHandler.importData: Patch=[null] f0 > 41 00 00 3f 12 41 62 00 00 41 63 75 53 74 69 .. 02 > 74 f7MIDI-OX > > This means that the Patch.driver field was set > properly when > Patch.getTransferData returns a patch. > > But when PatchTransferHandler.importData receives > the data, the value of driver > field becomes 'null'. Patch.driver field is private > access now, and > is set only by Patch.setDriver(IPatchDriver) method. > When the argument > Patch.setDriver() is null, setDriver method sets > driver field Generic > Driver. This means there is no way to set 'null' on > Patch.driver field. > > Scene also has similar problem. driver field for a > Patch in a Scene > becomes 'null' when it is received by a importData > method. > > For now I've fixed this bug by adding the following > code. > p.setDriver((IPatchDriver) > DriverUtil.chooseDriver(p.getByteArray())); > > This is very strange. I don't understand why this > line is required. If > you have any clue, let me know. > -- > Hiroo Hayashi > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. > Be one of 170 > Project Admins to receive an Apple iPod Mini FREE > for your judgement on > who ports your project to Linux PPC the best. > Sponsored by IBM. > Deadline: Sept. 24. Go here: > http://sf.net/ppc_contest.php > _______________________________________________ > Jsynthlib-devel mailing list > Jsy...@li... > https://lists.sourceforge.net/lists/listinfo/jsynthlib-devel > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |