Project

General

Profile

Actions

Bug #2544

closed

Problems with accessing items that don't exist in widgets

Added by Edwin Bentley about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
01/10/2014
Due date:
% Done:

0%

Estimated time:

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.

Actions #1

Updated by Koen Deforche about 10 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

Actions #2

Updated by Koen Deforche about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF