[solved] BUG: Drag&Drop in v17.3.0 not working |
Post Reply |
Author | ||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
Posted: 29 May 2017 at 9:37am |
|
Hi;
I'm using Toolkit 17.3.0 and in ReportSample application / Quality assurance / Drag & Drop drag and drop is definitely not working. Nothing happens there? What's the problem? |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
Hi;
It took me several hours to find out that Drag&Drop in v17.3.0 is no longer working. The ReportSample > Quality Assurance > Drag&Drop example shows the same faulty behaviour. Problem is in code of CXTPReportControl::OnDrop, line 4989:
At the red marked position iValid is always 1 (it's the result of the XTP_NM_REPORT_HASVALIDDROPTYPE message). If it would be 0 the function returns immediately at line 4934. Therefore the dropped records collection is never filled! Please fix this before releasing 18.0! |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
Hello Martin,
I have checked that sample and it works under win8.1(x64), VS2015, x86 and x64 ToolkitProlib. Please describe your environment. Steps to reproducing and other things which can help. Regards, Oleksandr Lebed |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
Hi;
take a look at this: http://forum.codejock.com/forum_posts.asp?TID=23346&PID=75810&title=bug-dragdrop-in-v1730-not-working#75810 I use windows 8.1, VS2008, 32bit application compiled with UNICODE defined Both controls on the sample do nothing! Neither start drag nor drop! |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(1)
|
|
Hi;
Here are parts of my code: INITIALIZATION
And my callbacks:
Nothing else - except filling several records (about 50) to the control and populate. When removing the red part as shown in my initial post, everything works as expected. BTW: I use d&d only in the same control to reorder rows. |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
So when iValid is 1 then this condition doesn't work and DROP operation continue to execute. This code works from 2009 year and I can't found such problems with XTP_NM_REPORT_HASVALIDDROPTYPE. |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
Hello;
The Problem is, that _GetSelectedRows(pDropRecords) is not called because !iValid is ALWAYS FALSE and the second part of the if condition is not further examined! Therefore the succeeding code has no valid records in the pDropRecords collection. We can reproduce the error on all of our machines with VS2008 up to VS2015 32bit and 64bit. |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
This bug can be reproduced on our Drag'n'Drop sample only with changes of code - with introducing XTP_NM_REPORT_HASVALIDDROPTYPE callbacks. That is why I couldn't reproduce.
So fix is if (!iValid && (!_GetSelectedRows(pDropRecords) || pDropRecords->GetCount() == GetRows()->GetCount()))if (!_GetSelectedRows(pDropRecords) || pDropRecords->GetCount() == GetRows()->GetCount()) |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
When you take a real close look at the code, than you see that the iValid is always one at this line of code. It can't be 0 because the method is exited in this case a few lines above. And it is not changed beween set by XTP_NM_REPORT_HASVALIDDROPTYPE and the if statement.
So I mean that it can be removed without any problems. |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
I have changed my previous post before your answer
|
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
Hi;
I'm still convinced that the iValid part can be completely removed! |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
yes, I have already removed it.
Thank you for bringing this to our attention! |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |