diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-15 18:27:34 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-15 18:27:34 -0500 |
| commit | 2d97a2446304daa1d57121d13143cce2ceaf69a3 (patch) | |
| tree | 920a6b86d1f405af0ed9e1b0953e50f3ad9f9bad /sysdata_windows.go | |
| parent | 8be17f087b0cb1706df837b3f956dcca2ced4568 (diff) | |
Added Combobox.SelectedIndex().
Diffstat (limited to 'sysdata_windows.go')
| -rw-r--r-- | sysdata_windows.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go index f0ecbf3..52e2806 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -340,7 +340,6 @@ func (s *sysData) insertBefore(what string, index int) (err error) { return nil } -// TODO differentiate between nothing selected and custom text entered for a Combobox func (s *sysData) selectedIndex() int { ret := make(chan uiret) defer close(ret) @@ -355,7 +354,7 @@ func (s *sysData) selectedIndex() int { ret: ret, } r := <-ret - if r.ret == uintptr(classTypes[s.ctype].selectedIndexErr) { // no selection + if r.ret == uintptr(classTypes[s.ctype].selectedIndexErr) { // no selection or manually entered text (apparently, for the latter) return -1 } return int(r.ret) |
