Poly List bug ?

Hi,

I'm experiencing strange behaviours with the Poly List components.

I have built a modal interface using multiple TAdvVerticalPolyLists, which is shown when double-clicking on the rows of a listview located in the main application form. The user interface is really close to the demo provided with the component : a vertical list on the left contains TWedgeItems, and when clicking on a wedge item, another vertical list is displayed on the right side of the form. In the form constructor, the first TWedgeItem is selected manually using the SelectItem() function.

When testing the application, I noticed that sometimes the view wasn't properly initialized. In other words, the list associated with the first wedge item was not shown. Another list was displayed (corresponding to another wedge item), even if I explitely displayed the first list in the form constructor. So I set breakpoints and I noticed that sometimes TWedgeItem.OnItemClick() was called even if no wedge item was clicked by the user, calling my code changing lists visibility.

It seems that the cursor position -when the user double-click to show my form with the Poly Lists-  is intercepted and reused by the library when the form is displayed. As a result, if the position of the mouse before showing the child form corresponds to a wedge item, the associated wedge item OnItemClick event handler is fired by the library.

Here are the stack traces, if that can help. This first stack trace is valid. From the form constructor, the default vertical list is shown through the ShowPage() function :

BackupActionsFormUnit.TBackupActionForm.ShowPage(ptBackupRestore) <- Default page is shown, OK
BackupActionsFormUnit.TBackupActionForm.Create(???,44,$56E3E50,$12F8A1,$12F840,$12FBF1,$56E465C,$577B21C)
BackupListFormUnit.TBackupForm.ShowActionsWindow
BackupListFormUnit.TBackupForm.TreeBackupListDblClick(???)
:00525413 TControl.DblClick + $1B
VirtualTrees.TBaseVirtualTree.WndProc((515, 1, 1179900, 0, 1, 0, 252, 18, 0, 0))
:00528c73 TWinControl.MainWndProc + $2F
:004498d6 StdWndProc + $16


But immediately, the following sequence of events is triggered. As you can see, GDIPBase.TCustomBaseList.DoMouseUp() is called and fires WedgeItem3ItemClick() incorrectly :

BackupActionsFormUnit.TBackupActionForm.ShowPage(ptClearAndDelete) <- Bad page is shown !!!
BackupActionsFormUnit.TBackupActionForm.WedgeItem3ItemClick(???,???)
GDIPCustomItem.TCustomItem.DoItemClick($5764FF0,$56FF7E0)
GDIPCustomItem.TCustomItem.DoMouseUp($5764FF0,???,[],6,111,($56FF7E0, itDefault),($5041B90, $5041AD0, $5041D10, $5041A10, $5041C50, $5041F50, $5041E90, $50420D0, $5041DD0, $5042010, $5707470, $5707440, $57074D0, $5707410, $57074A0, False, 7274502, $5127D10, nil))
GDIPBase.TCustomBaseList.DoMouseUp($5764FF0,mbLeft,[],6,111)
CustomItemsContainer.TCustomItemsContainer.MouseUp(mbLeft,[],6,111)
:00525829 TControl.DoMouseUp + $3D
:005295d5 TWinControl.WndProc + $56D
:00528c73 TWinControl.MainWndProc + $2F
:004498d6 StdWndProc + $16
:005295d5 TWinControl.WndProc + $56D
:00528c73 TWinControl.MainWndProc + $2F
:0044b7ee StdWndProc + $16


So it seems that there is a bug somewhere, causing too much events to be fired... I'm using Delphi 2010, and TMS Poly List 1.2.0.5.

Any hint appreciated !

Best regards,

Adrien

We did not receive similar reports, are you able to create a small test project for us to investigate?


Kind Regards, 
Scheldeman Pieter

Yes. I created a small test app and I'm able to reproduce the issue.

Here is a movie I made demonstrating the issue :
http://reisubar.net/tms/PolyList.avi

The first time, the right panel is displayed, since the position of the mouse when double-clicking on the parent form does not correspond to any wedge item in the child form. Second time, the cursor is under the second wedge item when double-clicking, so its OnClick event handler is incorrectly called, causing the second panel to be shown. Same behavior 3rd and 4th time. Finally, the last time the child form is immediately closed since the cursor is just under the "Close" wedge item which closes the form from within its event handler.

The demo project can be downloaded here : http://reisubar.net/tms/PolyList.zip

Let me know if you need more info. Hope you'll find the bug since that's really a showstopper for us.

Regards,

Adrien

Hi,

Could you reproduce the problem ? Should I provide more info about the bug ?

I made a second video : http://www.reisubar.net/tms/PolyList2.avi
It shows that event handlers are called when the form is shown even if no wedge items is clicked. The event handler which is called depends of the position of the mouse cursor when double-clicking on the parent form.

Regards,

Adrien


We are unable to compile your sample, please make sure only TMS components are included and the test project compiles without errors. Also your videos are unviewable in a standard Windows Media Player (v12)

With this information we are unable to reproduce and therefore unable to investigate this here.

Kind regards, 
Scheldeman Pieter

Videos are perfectly viewable. 

Hi,

Sorry. For the video, they were encoded using Camtasia internal codec, here is a video which should be readable anywhere :
http://reisubar.net/tms/TMSPolyListBug.mp4

For the project, there was some references to JEDI VCL and VirtualTree views, they are now removed. Sorry for thinking that every Delphi developer uses these components :-)
http://reisubar.net/tms/PolyList.zip

Best regards,

A.R.

Thank you for your changes to your video's and demo's, we have now been able to reproduce and fix this issue.

The fix will be available in the next release.

Kind Regards, 
Scheldeman Pieter

Thanks !