Possible bug in ComboBox.RemoveAt

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

In a VWG migrated app, we have a page where the user selects from 4 items in a combobox. Depending on previously-entered options on an earlier page, some of those items need to be removed to be made unavailable.

  1. Have a startup page that loads another page via Application.MainPage = new frmTestPage
  2. frmTestPage should have a ComboBox, with 4 items set at design-time
  3. In frmTestPage’s load event, run the following code

cboSizeType.Items.RemoveAt(2)
cboSizeType.Items.RemoveAt(1)
cboSizeType.SelectedIndex = 0

Error:

002652 Wisej: index out of bounds: 2 (0..0)
/ProjectName/resource.wx/Wisej.Web/qx.js?v=1.3.65.0:179261 Object.process()
/ProjectName/resource.wx/Wisej.Web/qx.js?v=1.3.65.0:15632 Object.__log()
/ProjectName/resource.wx/wisej.js?v=1.3.65.0:46314 WisejQX.log()
/ProjectName/resource.wx/wisej.js?v=1.3.65.0:1803 WisejCore.log()
/ProjectName/resource.wx/wisej.js?v=1.3.65.0:1757 WisejCore.logError()
/ProjectName/resource.wx/wisej.js?v=1.3.65.0:7553 wrapper.setState()
/ProjectName/resource.wx/wisej.js?v=1.3.65.0:46348 Object.createComponent()
/ProjectName/resource.wx/wisej.js?v=1.3.65.0:45836 WisejQX.createComponent()

It seems WiseJ is not recognizing that there is an item at that position.  See attached test-case.

Thanks,

Andrew

 

 

 

 

  • You must to post comments
0
0

Thanks. The error only appears in the javascript console right? It’s logged as WJ-8257 and fixed in our build.

Wisej optimizes the round trips. When you add an item and delete it before it’s sent to the client, the item is not sent at all (the list in your sample seems correct), but for the combobox it ended up sending back the request to remove the item as well, which doesn’t exist on the client.

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json