final value init() function deprecated
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
a23144e9a8
commit
ca8b7d87a7
13
table.go
13
table.go
|
@ -62,9 +62,6 @@ func initBTcolor(mh *modelHandler) {
|
||||||
func initValues(mh *modelHandler) {
|
func initValues(mh *modelHandler) {
|
||||||
mh.generatedColumnTypes = append(mh.generatedColumnTypes, ui.TableString(""))
|
mh.generatedColumnTypes = append(mh.generatedColumnTypes, ui.TableString(""))
|
||||||
mh.generatedColumnTypes = append(mh.generatedColumnTypes, ui.TableColor{})
|
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++ {
|
for i := 0; i < mh.rowcount; i++ {
|
||||||
// text for Column 0
|
// text for Column 0
|
||||||
|
@ -74,10 +71,6 @@ func initValues(mh *modelHandler) {
|
||||||
// text color for Column 0
|
// text color for Column 0
|
||||||
mh.rows[i].cells[2].value = ui.TableColor{0.9, 0, 0, 1}
|
mh.rows[i].cells[2].value = ui.TableColor{0.9, 0, 0, 1}
|
||||||
mh.rows[i].cells[2].name = "COLOR"
|
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,10 +125,12 @@ func newModelHandler(rowcount int) *modelHandler {
|
||||||
mh.rows = make([]rowData, mh.rowcount)
|
mh.rows = make([]rowData, mh.rowcount)
|
||||||
|
|
||||||
initBTcolor(mh)
|
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, 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})
|
initTextColorColumn(mh, 6, 7, "jwc67blah", ui.TableColor{0.3, 0.1, 0.9, 1})
|
||||||
initTextColumn(mh, 8, "jwc8blah")
|
initTextColumn (mh, 8, "jwc8blah")
|
||||||
// initButtonColumn(mh, 9, "but9ton")
|
// initButtonColumn(mh, 9, "but9ton")
|
||||||
|
|
||||||
log.Println("Called newModelHandler() with mh=", mh)
|
log.Println("Called newModelHandler() with mh=", mh)
|
||||||
|
|
Loading…
Reference in New Issue