JSCListView : inconsistencies with allowsDeselection_(true)
Brought to you by:
sciss
(
w = Window.new.front;
v = ListView(w,Rect(10,10,120,70))
.allowsDeselection_( true )
.value_( nil )
.items_([ "Test"])
.background_(Color.clear)
.action_({|v|
if( v.value.notNil, { v.item.postln });
});
)
i just saw a bug: you must follow this order, that is items_ must be after allowsDeselection_( true ) and value_( nil ), otherwise the item is still initially selected.
be careful to test v.value for nil before calling v.item. this is probably also a bug, and instead v.item should return nil instead of throwing an error.
best, -sciss-