Bug #2544
closedProblems with accessing items that don't exist in widgets
0%
Description
Hi, I'm noticing that there are quite a few places where attempting to access an item at a position that isn't valid (i.e. there isn't anything there) causes segmentation faults. For example if I create a WComboBox which is populated with items from the database, and there isn't anything in that specific table, if I try to use WComboBox~~itemText(0) it crashes, and I am finding that I have to make sure that items exist everywhere~~ the workaround I used here was to check if WComboBox->count() was equal to 0.
Is this the intended functionality? If so, the documentation should reflect this.
Updated by Koen Deforche almost 11 years ago
- Status changed from New to Resolved
Hey,
Wt follows the same conventions as the standard library: i.e. we do not check (or warn) against out-of-bound indexation.
I agree we should add this somewhere to the documentation.
Regards,
koen
Updated by Koen Deforche almost 11 years ago
- Status changed from Resolved to Closed