Fixed build errors in the previous commits.

This commit is contained in:
Pietro Gagliardi 2014-02-15 12:45:17 -05:00
parent 0c0bbc29fa
commit a65e5d8743
3 changed files with 8 additions and 5 deletions

View File

@ -186,7 +186,8 @@ const (
// TODO filter out notifications not provided in windows 2000
const (
// from winuser.h
// TODO get _CB_ERR out
_CB_ERR = (-1)
_CB_ERRSPACE = (-2)
_CBN_ERRSPACE = (-1) // TODO this will blow up the Go compiler if it's used
_CBN_SELCHANGE = 1
_CBN_DBLCLK = 2
@ -363,6 +364,7 @@ const (
// from winuser.h
_LB_OKAY = 0
_LB_ERR = (-1) // TODO this will blow up the Go compiler if it's used
_LB_ERRSPACE = (-2)
_LBN_ERRSPACE = (-2) // TODO this will blow up the Go compiler if it's used
_LBN_SELCHANGE = 1
_LBN_DBLCLK = 2

View File

@ -25,7 +25,7 @@ type classData struct {
mkid bool
altStyle uint32
appendMsg uintptr
insertBeforeString uintptr
insertBeforeMsg uintptr
deleteMsg uintptr
selectedIndexMsg uintptr
selectedIndexErr int
@ -353,7 +353,7 @@ func (s *sysData) selectedIndex() (int, error) {
ret: ret,
}
r := <-ret
if r.ret == classTypes[s.ctype].selectedIndexErr {
if r.ret == uintptr(classTypes[s.ctype].selectedIndexErr) {
return -1, nil
}
return int(r.ret), nil
@ -379,12 +379,12 @@ func (s *sysData) selectedIndices() ([]int, error) {
uintptr(0),
uintptr(0),
},
ret: ret
ret: ret,
}
r := <-ret
// TODO handle errors
indices := make([]int, r.ret)
uitask <- &uimisg{
uitask <- &uimsg{
call: _sendMessage,
p: []uintptr{
uintptr(s.hwnd),

View File

@ -3,6 +3,7 @@
package main
import (
"fmt"
"sync"
)