I've got a custom graphical widget based on an isc_Canvas. I've implemented the documented drag and drop interface and, for example, add my own getDragData() to my widget. Dragging from my widget to ListGrids, DetailViewers and TileGrids works fine. However, when I try to drag and drop from my widget into a TreeGrid folder, it fails with exceptions in SmartClient code.
Some pertinent details:
1) It appears that I have to implement a version of getData in my widget since that is used in TreeGrid.drop() to tell whether or not the drag and drop is within the same tree. I did that, just returning null which, from the code, appears to be enough to convince the drop code that we aren't moving elements within the same tree. That gets me past the first exception I ran into.
2) Having done that, I am now getting exceptions caused be the fact that cloneDragData() is returning null. This is not a documented function so I don't really know what to do get around this.
3) I'm using SmartClient 7.0, Safari 5.0.3 browser.
4) I looked in the LGPL code (7.0rc2_LGPL) but the cloneDragData function is not in there. It appears that it was added after 7.0rc2. Apparently the LGPL download on your site does not correspond to our licensed 7.0 release. Are you planning to make available an LGPL version of the actual released code?
So, given this background, my question is, how does one enable drag and drop into a TreeGrid from a custom widget? I may have missed it but I can't see any documented functions related to drag and drop that would help me here. Is there something more I need to implement in order to get this working? As far as I can tell, there is some stuff going on which assumes the source of the drag data is a Tree or Grid of some sort.
Thanks,
Scott
Some pertinent details:
1) It appears that I have to implement a version of getData in my widget since that is used in TreeGrid.drop() to tell whether or not the drag and drop is within the same tree. I did that, just returning null which, from the code, appears to be enough to convince the drop code that we aren't moving elements within the same tree. That gets me past the first exception I ran into.
2) Having done that, I am now getting exceptions caused be the fact that cloneDragData() is returning null. This is not a documented function so I don't really know what to do get around this.
3) I'm using SmartClient 7.0, Safari 5.0.3 browser.
4) I looked in the LGPL code (7.0rc2_LGPL) but the cloneDragData function is not in there. It appears that it was added after 7.0rc2. Apparently the LGPL download on your site does not correspond to our licensed 7.0 release. Are you planning to make available an LGPL version of the actual released code?
So, given this background, my question is, how does one enable drag and drop into a TreeGrid from a custom widget? I may have missed it but I can't see any documented functions related to drag and drop that would help me here. Is there something more I need to implement in order to get this working? As far as I can tell, there is some stuff going on which assumes the source of the drag data is a Tree or Grid of some sort.
Thanks,
Scott
Comment