fix the last callback
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
0a7370d7f8
commit
0a4a0c5f9b
|
@ -6,7 +6,7 @@ import "log"
|
|||
import "github.com/andlabs/ui"
|
||||
import _ "github.com/andlabs/ui/winmanifest"
|
||||
|
||||
import "github.com/davecgh/go-spew/spew"
|
||||
// import "github.com/davecgh/go-spew/spew"
|
||||
|
||||
func (mh *modelHandler) NumRows(m *ui.TableModel) int {
|
||||
// log.Println("NumRows() with m=", m)
|
||||
|
@ -32,14 +32,14 @@ func (mh *modelHandler) CellValue(m *ui.TableModel, row, column int) ui.TableVal
|
|||
}
|
||||
|
||||
func (mh *modelHandler) SetCellValue(m *ui.TableModel, row, column int, value ui.TableValue) {
|
||||
log.Println("SetCallValue() START")
|
||||
spew.Dump(m)
|
||||
spew.Dump(mh)
|
||||
if (mh.columnTypes == "standard") {
|
||||
defaultSetCellValue(mh, m, row, column, value)
|
||||
return
|
||||
log.Println("SetCallValue() START row=", row, "column=", column, "value=", value)
|
||||
// spew.Dump(m)
|
||||
// spew.Dump(mh)
|
||||
if (mh.setCellValue == nil) {
|
||||
log.Println("CellValue NOT DEFINED. This table wasn't setup correctly! mh.scanCellValue == nil")
|
||||
os.Exit(-1)
|
||||
}
|
||||
demoSetCellValue(mh, m, row, column, value)
|
||||
// spew.Dump(m)
|
||||
mh.setCellValue(mh, m, row, column, value)
|
||||
log.Println("SetCallValue() END")
|
||||
spew.Dump(m)
|
||||
}
|
||||
|
|
7
gui.go
7
gui.go
|
@ -248,13 +248,8 @@ func setupUI() {
|
|||
mainwin.SetChild(maintab)
|
||||
mainwin.SetMargined(true)
|
||||
|
||||
name := "v000185.testing.com.customers.wprod.wit.com"
|
||||
maintab.Append(name, makeDemotable(name))
|
||||
tabcount = 0
|
||||
maintab.SetMargined(tabcount, true)
|
||||
|
||||
maintab.Append("List examples", makeNumbersPage())
|
||||
tabcount += 1
|
||||
tabcount = 0
|
||||
maintab.SetMargined(tabcount, true)
|
||||
|
||||
maintab.Append("Choosers examples", makeDataChoosersPage())
|
||||
|
|
|
@ -6,7 +6,7 @@ import "log"
|
|||
import "github.com/andlabs/ui"
|
||||
import _ "github.com/andlabs/ui/winmanifest"
|
||||
|
||||
import "github.com/davecgh/go-spew/spew"
|
||||
// import "github.com/davecgh/go-spew/spew"
|
||||
|
||||
func (mh *modelHandler) NumRows(m *ui.TableModel) int {
|
||||
// log.Println("NumRows() with m=", m)
|
||||
|
@ -32,14 +32,14 @@ func (mh *modelHandler) CellValue(m *ui.TableModel, row, column int) ui.TableVal
|
|||
}
|
||||
|
||||
func (mh *modelHandler) SetCellValue(m *ui.TableModel, row, column int, value ui.TableValue) {
|
||||
log.Println("SetCallValue() START")
|
||||
spew.Dump(m)
|
||||
spew.Dump(mh)
|
||||
if (mh.columnTypes == "standard") {
|
||||
defaultSetCellValue(mh, m, row, column, value)
|
||||
return
|
||||
log.Println("SetCallValue() START row=", row, "column=", column, "value=", value)
|
||||
// spew.Dump(m)
|
||||
// spew.Dump(mh)
|
||||
if (mh.setCellValue == nil) {
|
||||
log.Println("CellValue NOT DEFINED. This table wasn't setup correctly! mh.scanCellValue == nil")
|
||||
os.Exit(-1)
|
||||
}
|
||||
demoSetCellValue(mh, m, row, column, value)
|
||||
// spew.Dump(m)
|
||||
mh.setCellValue(mh, m, row, column, value)
|
||||
log.Println("SetCallValue() END")
|
||||
spew.Dump(m)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue