OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: Jim Short on October 12, 2015, 01:45:20 PM

Title: dcl-ListBox-GetCurSel returns nil with items in list. 8.0.1.0 ACAD2004
Post by: Jim Short on October 12, 2015, 01:45:20 PM
First item highlighted:
_1_$ (dcl-ListBox-GetCurSel Std/ToolSelect/lstType)
0
Deselect first item:
_1_$ (dcl-ListBox-setCurSel Std/ToolSelect/lstType -1)
T
Query for item selected:
_1_$ (dcl-ListBox-GetCurSel Std/ToolSelect/lstType)
nil

ListBox has 19 items so this should return -1 saying no current selection.
Isn't nil representative of a ListBox with no items?
Title: Re: dcl-ListBox-GetCurSel returns nil with items in list. 8.0.1.0 ACAD2004
Post by: owenwengerd on October 13, 2015, 01:48:00 AM
Good catch, Jim. This is now fixed for the next build.
Title: Re: dcl-ListBox-GetCurSel returns nil with items in list. 8.0.1.0 ACAD2004
Post by: Jim Short on November 19, 2015, 05:22:44 AM
Owen,
Was this fixed in 8.0.2.0?
I still get nil when no items selected.
Title: Re: dcl-ListBox-GetCurSel returns nil with items in list. 8.0.1.0 ACAD2004
Post by: owenwengerd on November 19, 2015, 08:10:20 AM
Quote from: Jim Short on November 19, 2015, 05:22:44 AM
Was this fixed in 8.0.2.0?

No, 8.02 was released before this was fixed. There will be another update released either this weekend or early next week, and that one will include the fix.
Title: Re: dcl-ListBox-GetCurSel returns nil with items in list. 8.0.1.0 ACAD2004
Post by: Jim Short on November 23, 2015, 06:26:32 AM
Thanks Owen, works great!
Jim