diff --git a/example-UI-table/tableCallbacks.go b/example-UI-table/tableCallbacks.go index 194b9d9..0155b0d 100644 --- a/example-UI-table/tableCallbacks.go +++ b/example-UI-table/tableCallbacks.go @@ -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) } diff --git a/gui.go b/gui.go index 0fa2130..41a6e50 100644 --- a/gui.go +++ b/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()) diff --git a/tableCallbacks.go b/tableCallbacks.go index 194b9d9..0155b0d 100644 --- a/tableCallbacks.go +++ b/tableCallbacks.go @@ -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) }