From 353c949f64f5882a3149d76ce17de58c31cfc96d Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 10 Mar 2014 10:39:08 -0400 Subject: [PATCH] Removed error returns from sysData.setText() now that we no longer care. --- sysdata.go | 2 +- sysdata_darwin.go | 3 +-- sysdata_unix.go | 3 +-- sysdata_windows.go | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sysdata.go b/sysdata.go index ce352bb..a942122 100644 --- a/sysdata.go +++ b/sysdata.go @@ -31,7 +31,7 @@ func (c *cSysData) show() { func (c *cSysData) hide() { panic(runtime.GOOS + " sysData does not define hide()") } -func (c *cSysData) setText(text string) error { +func (c *cSysData) setText(text string) { panic(runtime.GOOS + " sysData does not define setText()") } func (c *cSysData) setRect(x int, y int, width int, height int, winheight int) error { diff --git a/sysdata_darwin.go b/sysdata_darwin.go index e58ad9c..be17825 100644 --- a/sysdata_darwin.go +++ b/sysdata_darwin.go @@ -340,7 +340,7 @@ func (s *sysData) hide() { <-ret } -func (s *sysData) setText(text string) error { +func (s *sysData) setText(text string) { var zeroSel C.SEL if classTypes[s.ctype].settextsel == zeroSel { // does not have concept of text @@ -353,7 +353,6 @@ func (s *sysData) setText(text string) error { ret <- struct{}{} } <-ret - return nil } func (s *sysData) setRect(x int, y int, width int, height int, winheight int) error { diff --git a/sysdata_unix.go b/sysdata_unix.go index 7b5a78d..38e589c 100644 --- a/sysdata_unix.go +++ b/sysdata_unix.go @@ -183,7 +183,7 @@ func (s *sysData) hide() { <-ret } -func (s *sysData) setText(text string) error { +func (s *sysData) setText(text string) { if classTypes[s.ctype].setText == nil { // does not have concept of text return nil } @@ -194,7 +194,6 @@ func (s *sysData) setText(text string) error { ret <- struct{}{} } <-ret - return nil } func (s *sysData) setRect(x int, y int, width int, height int, winheight int) error { diff --git a/sysdata_windows.go b/sysdata_windows.go index 798076b..f67b7e1 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -241,7 +241,7 @@ func (s *sysData) hide() { <-ret } -func (s *sysData) setText(text string) error { +func (s *sysData) setText(text string) { ret := make(chan uiret) defer close(ret) uitask <- &uimsg{ @@ -256,7 +256,6 @@ func (s *sysData) setText(text string) error { if r.ret == 0 { // failure panic(fmt.Errorf("error setting window/control text: %v", err)) } - return nil } func (s *sysData) setRect(x int, y int, width int, height int, winheight int) error {