Similar to MouseDown/Drag/Up, DragOver and DragExit will not fire if you do not return true from DragEnter. The return value from DragOver tells REALbasic whether or not your control is accepting the drop.

Hmmm - in my testing here, DragOver and DragExit both fire regardless of what you return from DragEnter. According to the Lang Ref, if you return TRUE from DragEnter, it will simply prevent the drop from occurring. Is it supposed to prevent all of the other dragging events from firing?



So back to the issue of Drag and Drop changing from r2 to r3:

I just fired up r2 and ran the same simple (Listboxes from the Examples) project.

I added return TRUE in the DragEnter event of Listbox2 (the target listbox) and ran the project. Returning true in the DragEnter event doesn't seem to do anything in either r2 or r3. It certainly doesn't prevent the DropObject event from occurring.


When you drag and drop a row from one listbox to another in r2 here is the sequence of events in the target listbox:

r2 Sequence:

DragEnter
DragOver
DropObject



r2 Sequence
DragEnter
DragOver
DragExit      <- New event being fired
DropObject

This is a huge issue for us as it breaks all of our main projects. So now it's back to r2 :-(

Update: Now that I typed all of that, I decided to look to see if there are any bug reports - low and behold there is (doh!). PLEASE sign on.

http://www.realsoftware.com/feedback/viewreport.php? reportid=oxfivztn&cmd=watch

Thanks.

Jay Wooten, President
Go Data Systems, Inc.
www.godatasystems.com
[EMAIL PROTECTED]




On Jul 12, 2006, at 9:01 AM, Jonathan Johnson wrote:


On Jul 12, 2006, at 8:50 AM, Karen wrote:


I think if DropObject fires DragExit SHOULD not because the object being dragged never exits... after all it was dropped there!

However, if the control is drawing a custom accept-drop image, putting the code to remove that indicator in the DragExit event seems like a likely candidate. If the DragExit event didn't fire, you would need to put this code in two spots.

My understanding was that DragExist in the companion to DragEnter to track movement into and out of a given control, not to mark the end of the drag if dropped...

DropObject will always signal that something has been dropped. DragExit simply says that the drag is no longer within your control's bounds, which is true if the drag no longer exists.

And DragEnter/DragExit should not fire unless the control can accept that drop...

DragEnter should always fire. If you return true, you tell REALbasic that you want to handle the drag operation, regardless of whether or not your control registered to handle that type of drag. Similar to MouseDown/Drag/Up, DragOver and DragExit will not fire if you do not return true from DragEnter. The return value from DragOver tells REALbasic whether or not your control is accepting the drop.

I vaguely recall seeing inconstancies Xplatform in these behavior but I may be wrong.

If any inconsistencies are found, please do file bug reports.

Thanks,
Jon


--
Jonathan Johnson
[EMAIL PROTECTED]
REAL Software, Inc.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to