Deselect Items:
_1_$ (dcl-ListView-SetCurSel Std/ToolSelect/lstTools -1)
T
Get the current selection: Should be -1
_1_$ (dcl-ListView-getCurSel Std/ToolSelect/lstTools)
2
_1_$ (dcl-ListView-GetSelectedNths Std/ToolSelect/lstTools)
nil
_1_$
Does dcl-ListView-GetSelectedNths return nil to represent empty list?
SetCurSel works only for single-selection list boxes. For multiple-selection list boxes, use(dcl-ListBox-SelectItem) (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/ListBox/SelectItem.htm) or (dcl-ListBox-SelItemRange) (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/ListBox/SelItemRange.htm).
I believe the two functions you have mentioned pertain to ListBox and not ListView.
Is there a way to improve the help description http://www.opendcl.com/HelpFiles/index.php? to give more information.
I am going to look at (dcl-ListView-GetSelCount to determine whats is currently selected. I do not see a way to programmatically select more than one item. Not sure why one would ever want to.
Thanks, Jim
Oops, I missed that you were using a ListView. I was able to reproduce the problem, and it is now fixed for the next build.
GetSelectedNths should return an empty list (and NIL is the empty list) if no items are selected. The reference documentation is purposely very concise, but please let me know where you think it can be improved.