Removed now-unused error returns from sysData.show() and sysData.hide().
This commit is contained in:
parent
3ed9c0b75d
commit
f72d6c9900
|
@ -25,10 +25,10 @@ func (c *cSysData) make(initText string, window *sysData) error {
|
|||
func (c *cSysData) firstShow() error {
|
||||
panic(runtime.GOOS + " sysData does not define firstShow()")
|
||||
}
|
||||
func (c *cSysData) show() error {
|
||||
func (c *cSysData) show() {
|
||||
panic(runtime.GOOS + " sysData does not define show()")
|
||||
}
|
||||
func (c *cSysData) hide() error {
|
||||
func (c *cSysData) hide() {
|
||||
panic(runtime.GOOS + " sysData does not define hide()")
|
||||
}
|
||||
func (c *cSysData) setText(text string) error {
|
||||
|
|
|
@ -320,7 +320,7 @@ func (s *sysData) firstShow() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) show() error {
|
||||
func (s *sysData) show() {
|
||||
ret := make(chan struct{})
|
||||
defer close(ret)
|
||||
uitask <- func() {
|
||||
|
@ -328,10 +328,9 @@ func (s *sysData) show() error {
|
|||
ret <- struct{}{}
|
||||
}
|
||||
<-ret
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) hide() error {
|
||||
func (s *sysData) hide() {
|
||||
ret := make(chan struct{})
|
||||
defer close(ret)
|
||||
uitask <- func() {
|
||||
|
@ -339,7 +338,6 @@ func (s *sysData) hide() error {
|
|||
ret <- struct{}{}
|
||||
}
|
||||
<-ret
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) setText(text string) error {
|
||||
|
|
|
@ -162,7 +162,7 @@ func (s *sysData) firstShow() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) show() error {
|
||||
func (s *sysData) show() {
|
||||
ret := make(chan struct{})
|
||||
defer close(ret)
|
||||
uitask <- func() {
|
||||
|
@ -170,10 +170,9 @@ func (s *sysData) show() error {
|
|||
ret <- struct{}{}
|
||||
}
|
||||
<-ret
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) hide() error {
|
||||
func (s *sysData) hide() {
|
||||
ret := make(chan struct{})
|
||||
defer close(ret)
|
||||
uitask <- func() {
|
||||
|
@ -181,7 +180,6 @@ func (s *sysData) hide() error {
|
|||
ret <- struct{}{}
|
||||
}
|
||||
<-ret
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) setText(text string) error {
|
||||
|
|
|
@ -213,7 +213,7 @@ func (s *sysData) firstShow() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) show() (err error) {
|
||||
func (s *sysData) show() {
|
||||
ret := make(chan uiret)
|
||||
defer close(ret)
|
||||
uitask <- &uimsg{
|
||||
|
@ -225,20 +225,20 @@ func (s *sysData) show() (err error) {
|
|||
ret: ret,
|
||||
}
|
||||
<-ret
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) hide() (err error) {
|
||||
func (s *sysData) hide() {
|
||||
ret := make(chan uiret)
|
||||
defer close(ret)
|
||||
// TODO figure out how to handle error
|
||||
uitask <- &uimsg{
|
||||
call: _showWindow,
|
||||
p: []uintptr{uintptr(s.hwnd), _SW_HIDE},
|
||||
p: []uintptr{
|
||||
uintptr(s.hwnd),
|
||||
uintptr(_SW_HIDE),
|
||||
},
|
||||
ret: ret,
|
||||
}
|
||||
<-ret
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *sysData) setText(text string) error {
|
||||
|
|
1
todo.md
1
todo.md
|
@ -3,7 +3,6 @@ so I don't forget:
|
|||
- Control.Show()/Control.Hide()
|
||||
- Groupbox
|
||||
- see if we really need to track errors on a lot of places that report errors
|
||||
- Window.Show()/Window.Hide() report errors due to UpdateWindow(), which can fail, but that is only called when the window is first opened: split that functionality out
|
||||
- it appears GTK+ and Cocoa both either don't provide a convenient way to grab errors or you're not supposed to; I assume you're supposed to just assume everything works... but on Windows we check errors for functions that return errors, and there's no guarantee that only certian errors will be returned...
|
||||
- character-limited entry fields, numeric entry fields, multiline entry fields
|
||||
- possible rename of LineEdit?
|
||||
|
|
Loading…
Reference in New Issue