Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » No callback on last row deletion
No callback on last row deletion [message #51391] Tue, 19 March 2019 11:08 Go to next message
hojtsy is currently offline  hojtsy
Messages: 241
Registered: January 2006
Location: Budapest, Hungary
Experienced Member
When deleting rows of an ArrayCtrl by calling ar.Remove(ar.GetCursor()), I usually get a callback on ArrayCtrl::WhenAction. However when the last row is deleted and the ArrayCtrl becomes empty, none of these callbacks seems to be called: WhenAction, WhenArrayAction, WhenCursor. I believe this is a bug, and all of these should have been called, as there are changes to the array, and the cursor as well.
Re: No callback on last row deletion [message #51496 is a reply to message #51391] Thu, 04 April 2019 23:19 Go to previous message
mirek is currently offline  mirek
Messages: 11822
Registered: November 2005
Ultimate Member
WhenAction in general is (or should be) only triggered when the action is caused by user interaction.

WhenCursor is deprecated in favor of WhenSel, which should report all changes to cursor or selection.

Anyway, WhenArrayAction is defined to trigger when data of ArrayCtrl are changed by any means. I have tried to fix it in that direction. (Frankly, I have scanned all of my codebase and found only two uses of WhenArrayAction. But you are right that it should work that way).

Now in trunk.

Mirek
Previous Topic: Please Remove BUG in DataGrid
Goto Forum:
  


Current Time: Fri Apr 19 00:20:36 CEST 2019

Total time taken to generate the page: 0.00901 seconds