summaryrefslogtreecommitdiff
path: root/listbox.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-11 13:50:02 -0400
committerPietro Gagliardi <[email protected]>2014-03-11 13:50:02 -0400
commit92fb9efce9d9f84e06f574243218e3c6d7478d18 (patch)
tree8dab00a7dd655e9dd04008da50e6eb38bbdd939d /listbox.go
parentc43583fe20a3a54920774fb762c74d22b60b70dc (diff)
Removed error returns from Combobox.Delete(), Listbox.Delete(), and sysData.delete(), since they are no longer used. Updated the TODO file to mark this issue closed.
Diffstat (limited to 'listbox.go')
-rw-r--r--listbox.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/listbox.go b/listbox.go
index 63f8722..7e05287 100644
--- a/listbox.go
+++ b/listbox.go
@@ -70,7 +70,7 @@ badrange:
}
// Delete removes the given item from the Listbox. It panics if the given index is out of bounds.
-func (l *Listbox) Delete(index int) error {
+func (l *Listbox) Delete(index int) {
l.lock.Lock()
defer l.lock.Unlock()
@@ -78,13 +78,14 @@ func (l *Listbox) Delete(index int) error {
if index < 0 || index >= l.sysData.len() {
goto badrange
}
- return l.sysData.delete(index)
+ l.sysData.delete(index)
+ return
}
if index < 0 || index >= len(l.initItems) {
goto badrange
}
l.initItems = append(l.initItems[:index], l.initItems[index + 1:]...)
- return nil
+ return
badrange:
panic(fmt.Errorf("index %d out of range in Listbox.Delete()", index))
}