final value init() function deprecated
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
a23144e9a8
commit
ca8b7d87a7
15
table.go
15
table.go
|
@ -62,9 +62,6 @@ func initBTcolor(mh *modelHandler) {
|
|||
func initValues(mh *modelHandler) {
|
||||
mh.generatedColumnTypes = append(mh.generatedColumnTypes, ui.TableString(""))
|
||||
mh.generatedColumnTypes = append(mh.generatedColumnTypes, ui.TableColor{})
|
||||
mh.generatedColumnTypes = append(mh.generatedColumnTypes, ui.TableString("test"))
|
||||
mh.generatedColumnTypes = append(mh.generatedColumnTypes, ui.TableString(""))
|
||||
mh.generatedColumnTypes = append(mh.generatedColumnTypes, ui.TableColor{})
|
||||
|
||||
for i := 0; i < mh.rowcount; i++ {
|
||||
// text for Column 0
|
||||
|
@ -74,10 +71,6 @@ func initValues(mh *modelHandler) {
|
|||
// text color for Column 0
|
||||
mh.rows[i].cells[2].value = ui.TableColor{0.9, 0, 0, 1}
|
||||
mh.rows[i].cells[2].name = "COLOR"
|
||||
|
||||
// set the button text for Column 1
|
||||
mh.rows[i].cells[3].value = ui.TableString(fmt.Sprintf("awesome %d", i))
|
||||
mh.rows[i].cells[3].name = "BUTTON"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,11 +125,13 @@ func newModelHandler(rowcount int) *modelHandler {
|
|||
mh.rows = make([]rowData, mh.rowcount)
|
||||
|
||||
initBTcolor(mh)
|
||||
initValues(mh)
|
||||
// initValues(mh)
|
||||
initTextColorColumn(mh, 1, 2, "really fun", ui.TableColor{0.9, 0, 0, 1})
|
||||
initButtonColumn (mh, 3, "but3ton")
|
||||
initTextColorColumn(mh, 4, 5, "jwc45blah", ui.TableColor{0.0, 0.9, 0.4, 1})
|
||||
initTextColorColumn(mh, 6, 7, "jwc67blah", ui.TableColor{0.3, 0.1, 0.9, 1})
|
||||
initTextColumn(mh, 8, "jwc8blah")
|
||||
// initButtonColumn(mh, 9, "but9ton")
|
||||
initTextColumn (mh, 8, "jwc8blah")
|
||||
// initButtonColumn(mh, 9, "but9ton")
|
||||
|
||||
log.Println("Called newModelHandler() with mh=", mh)
|
||||
spew.Dump(mh)
|
||||
|
|
Loading…
Reference in New Issue