summaryrefslogtreecommitdiff
path: root/checkbox.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-11 11:47:38 -0400
committerPietro Gagliardi <[email protected]>2014-03-11 11:47:38 -0400
commitd07d0f481a3b3bc862480d0a8f1e677fdae303fc (patch)
treec4647417b87cb85acc88814d4ac09b567da44629 /checkbox.go
parentf8ec4b6305b75e2e5dee5d4262a3ac7108caf916 (diff)
Removed a TODO in Checkbox and made its behavior more precise.
Diffstat (limited to 'checkbox.go')
-rw-r--r--checkbox.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/checkbox.go b/checkbox.go
index 037588d..0b060df 100644
--- a/checkbox.go
+++ b/checkbox.go
@@ -5,7 +5,7 @@ import (
"sync"
)
-// A Checkbox is a clickable square with a label. The square can be either checked or unchecked.
+// A Checkbox is a clickable square with a label. The square can be either checked or unchecked. Checkboxes start out unchecked.
type Checkbox struct {
// TODO provide a channel for broadcasting check changes
@@ -52,8 +52,10 @@ func (c *Checkbox) Checked() bool {
c.lock.Lock()
defer c.lock.Unlock()
- // TODO if not created
- return c.sysData.isChecked()
+ if c.created {
+ return c.sysData.isChecked()
+ }
+ return false
}
func (c *Checkbox) make(window *sysData) error {