Bug 6584

"FindItem()" on DropDownListBox always return correct index, although item is lcoated BEFORE start index 08 June, 2021

Constantin Bergatt
11 May, 2021
Product: PowerBuilder Category: Controls & UI
Version: 2019 R3 Build: 2703
Classification: Sybase (legacy) bug Publishing: Public
Priority: P3
Status: Scheduling Reason:
Constantin Bergatt 12 May, 2021
#4
Hi Chris, hi Baron,

many thanks for the feedback!

Please keep me update on any progress made.

Regards,
Constantin
Baron Zhang @Appeon 11 May, 2021
#3
Hi Constantin,

We can reproduce this issue and we’ve submitted the issue to our development team for further analysis for a solution. 
BTW, PB 12.6 also has the same behavior.

Regards,
Baron
Chris Pollach @Appeon 11 May, 2021
#2
Hi Constantin;

  Thank you so much for bringing this issue to our attention and also for the great test case. I was able to reproduce the FindItem() issue on my R3 based test PC as well.

  I will now transfer this ticket over to the main Support / Engineering team for their review & feedback on this issue.

Regards ... Chris
Constantin Bergatt 11 May, 2021
#1
testapp (Version 1).zip (245KB)

*Phenomenon:
Currently we found a bug within the "FindItem()" functionality of a DropDownListBox control. It seems that the "FindItem()" functionality does ignore the "index" argument and always searches the whole list instead of only the restricted area defined by "index".

*Reproduce Steps:
You can find a respective test application attached to this bug (see testapp (Version 1).7z).

In the provided test application archive you will find the following :
- "Screenshots" folder : Some explanatory screenshots.

1. Create a small test application with a very simple window, which does have a DropDownListBox and three buttons.
2. Prefill the DropDownListBox with somewhat different items.
3. Select one of the different items and implement "FindItem()" calls for the selected element into each of the buttons "clicked" events. The only difference between each implementation should be, that the first button uses an "index" of 0 (meaning searching throughout the whole list), whereas the other two buttons are using indexes "behind" (>= index) the selected element.
4. Add an message box to all of the implementations, which should display the return value of the FindItem()" call.
5. Run the application.
6. Click the first button.

Result : The return value equals the correct index of the searched / selected item.

7. Click the second and third button.

Result : The return value equals the correct index of the searched / selected item.
Expected : The return value should be -1, as the searched / selected item is not in the restricted search area.

Remarks:
OS:
Windows 10
Platform:
All
Database Type:
SAP SQL Anywhere
Database Version:
17.0.10.6175