summaryrefslogtreecommitdiff
path: root/button.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-12 21:47:39 -0400
committerPietro Gagliardi <[email protected]>2014-03-12 21:47:39 -0400
commit26c6b97ce1198c879ebc499661e1ba65239ede7d (patch)
tree548c817b01add07d0c0fa49bf7c1b87deec131ff /button.go
parenteb48ed09c3621cd3ac94c1d9cdbe310cf0f44eaf (diff)
Removed ui.Event(); all event channels are initialized with their objects now.
Diffstat (limited to 'button.go')
-rw-r--r--button.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/button.go b/button.go
index 195ebb3..61c9da5 100644
--- a/button.go
+++ b/button.go
@@ -7,8 +7,8 @@ import (
// A Button represents a clickable button with some text.
type Button struct {
- // This channel gets a message when the button is clicked.
- // Unlike other channels in this package, this channel is initialized to non-nil when creating a new button, and cannot be set to nil later.
+ // Clicked gets a message when the button is clicked.
+ // You cannot change it once the Window containing the Button has been opened.
Clicked chan struct{}
lock sync.Mutex
@@ -22,7 +22,7 @@ func NewButton(text string) (b *Button) {
return &Button{
sysData: mksysdata(c_button),
initText: text,
- Clicked: Event(),
+ Clicked: newEvent(),
}
}