|
|
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl/DropGrid problem: Value related.
GridCtrl/DropGrid problem: Value related. [message #33604] |
Mon, 29 August 2011 21:01  |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
I didn't update my UPP for a while. Then I did a update yesterday, only to find a previously working program now crashes.
I use an ArrayCtrl to display/edit data. There is an integer field whose Converter (Format/Scan) has been tested to work correctly. There is a DropGrid ctrl assoicated with the field for editing. The problem occurs when the edit started on a new row, or on any row where the field doesn't have a valid value.
The process is like following:
1. When I clicked the field to have it enter edit mode, I notice it works as intended;
2. When I use up/down arrow to select a value from the DropGrid's pick list, it works fine. After this, I can use keyboard or mouse to bring up the popup and make selection as before (the update);
3. If I skipped step 2 and the field is currently blank, press keyboard or double click in the field will crash the program, with a debug time message:
Assertion failed in c:\upp\uppsrc\core\Vcont.h, line 33
i>=0 && i<items
I figure it happened when DropGrid is trying to search a match entry in the picklist where none is existent.
I haven't done a simplified test example yet because most likely unodgs already got a fix to my problem.
|
|
|
|
Re: GridCtrl/DropGrid problem: Value related. [message #33608 is a reply to message #33605] |
Tue, 30 August 2011 08:14   |
|
Please use this fix (it will be committed in the evening)
void DropGrid::SearchCursor()
{
if(!list.IsCursor())
return;
if(trowid < -1)
trowid = rowid;
value = list.Get(value_col);
rowid = list.GetRowId();
Refresh();
}
Crash was caused by one of the latest changes (feature request) that WhenSearchString should be called when list is cleared.
Thank you for the test case! (It really speeds up finding bugs)
[Updated on: Tue, 30 August 2011 08:15] Report message to a moderator
|
|
|
|
Re: GridCtrl/DropGrid problem: Value related. [message #33611 is a reply to message #33610] |
Tue, 30 August 2011 17:41   |
|
Lance wrote on Tue, 30 August 2011 08:09 |
If you need I will try to create a sample program to reproduce the defects I mentioned above. Please let me know. If you are too pressed with other more important issues, than forget it. It doesn't bother me as much anyways.
|
Please prepare a program especially if the problem that occurs is not so easy to reproduce. That will save me a lot of time.
PS: I use DropGrid/GridCtrl controls a lot in my applications - that means it's also my business to have them working correctly , so I'm very happy to fix every possible bug small or big one.
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 12:35:06 CEST 2025
Total time taken to generate the page: 0.01151 seconds
|
|
|