new gui release
more quiet output allow disabling of more errors sets the text on window open checkbox state works Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
c017dc9be0
commit
8a497bf538
12
action.go
12
action.go
|
@ -199,7 +199,7 @@ func processAction(a *widget.Action) {
|
||||||
|
|
||||||
if a.ActionType == widget.Add {
|
if a.ActionType == widget.Add {
|
||||||
n := add(a)
|
n := add(a)
|
||||||
show(n, n.State.Visable)
|
show(n, ! a.State.Hidden)
|
||||||
// pad(n, n.State.Pad)
|
// pad(n, n.State.Pad)
|
||||||
// expand(n, a.State.Expand)
|
// expand(n, a.State.Expand)
|
||||||
return
|
return
|
||||||
|
@ -217,10 +217,12 @@ func processAction(a *widget.Action) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Error(errors.New("andlabs processAction() ERROR findWidgetId found nil"), a.ActionType, a.WidgetType)
|
log.Error(errors.New("andlabs processAction() ERROR findWidgetId found nil"), a.ActionType, a.WidgetType)
|
||||||
log.Log(NOW, "processAction() ERROR findWidgetId found nil for id =", a.WidgetId)
|
log.Log(WARN, "processAction() ERROR findWidgetId found nil for id =", a.WidgetId)
|
||||||
log.Log(NOW, "processAction() ERROR findWidgetId found nil", a.ActionType, a.WidgetType)
|
log.Log(WARN, "processAction() ERROR findWidgetId found nil", a.ActionType, a.WidgetType)
|
||||||
log.Log(NOW, "processAction() ERROR findWidgetId found nil for id =", a.WidgetId)
|
log.Log(WARN, "processAction() ERROR findWidgetId found nil for id =", a.WidgetId)
|
||||||
me.treeRoot.ListWidgets()
|
if WARN.Bool() {
|
||||||
|
me.treeRoot.ListWidgets()
|
||||||
|
}
|
||||||
return
|
return
|
||||||
panic("findWidgetId found nil for id = " + string(a.WidgetId))
|
panic("findWidgetId found nil for id = " + string(a.WidgetId))
|
||||||
}
|
}
|
||||||
|
|
5
add.go
5
add.go
|
@ -32,16 +32,20 @@ func add(a *widget.Action) *tree.Node {
|
||||||
newButton(p, n)
|
newButton(p, n)
|
||||||
case widget.Checkbox:
|
case widget.Checkbox:
|
||||||
newCheckbox(p, n)
|
newCheckbox(p, n)
|
||||||
|
setChecked(n, a.State.Checked)
|
||||||
case widget.Spinner:
|
case widget.Spinner:
|
||||||
newSpinner(p, n)
|
newSpinner(p, n)
|
||||||
case widget.Slider:
|
case widget.Slider:
|
||||||
newSlider(p, n)
|
newSlider(p, n)
|
||||||
case widget.Dropdown:
|
case widget.Dropdown:
|
||||||
newDropdown(p, n)
|
newDropdown(p, n)
|
||||||
|
setText(n, a)
|
||||||
case widget.Combobox:
|
case widget.Combobox:
|
||||||
newCombobox(p, n)
|
newCombobox(p, n)
|
||||||
|
setText(n, a)
|
||||||
case widget.Textbox:
|
case widget.Textbox:
|
||||||
newTextbox(p, n)
|
newTextbox(p, n)
|
||||||
|
setText(n, a)
|
||||||
/*
|
/*
|
||||||
case widget.Image:
|
case widget.Image:
|
||||||
newImage(p, n)
|
newImage(p, n)
|
||||||
|
@ -49,5 +53,6 @@ func add(a *widget.Action) *tree.Node {
|
||||||
default:
|
default:
|
||||||
log.Log(ERROR, "add() error TODO: ", n.WidgetType, n.State.ProgName)
|
log.Log(ERROR, "add() error TODO: ", n.WidgetType, n.State.ProgName)
|
||||||
}
|
}
|
||||||
|
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
2
flags.go
2
flags.go
|
@ -25,7 +25,7 @@ func init() {
|
||||||
NOW = log.NewFlag("NOW", true, full, short, "temp debugging stuff")
|
NOW = log.NewFlag("NOW", true, full, short, "temp debugging stuff")
|
||||||
INFO = log.NewFlag("INFO", false, full, short, "normal debugging stuff")
|
INFO = log.NewFlag("INFO", false, full, short, "normal debugging stuff")
|
||||||
|
|
||||||
WARN = log.NewFlag("WARN", true, full, short, "bad things")
|
WARN = log.NewFlag("WARN", false, full, short, "bad things")
|
||||||
SPEW = log.NewFlag("SPEW", false, full, short, "spew stuff")
|
SPEW = log.NewFlag("SPEW", false, full, short, "spew stuff")
|
||||||
|
|
||||||
CHANGE = log.NewFlag("CHANGE", false, full, short, "show when the user does things")
|
CHANGE = log.NewFlag("CHANGE", false, full, short, "show when the user does things")
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -6,7 +6,7 @@ require (
|
||||||
go.wit.com/dev/andlabs/ui v0.0.1
|
go.wit.com/dev/andlabs/ui v0.0.1
|
||||||
go.wit.com/log v0.5.6
|
go.wit.com/log v0.5.6
|
||||||
go.wit.com/toolkits/tree v0.13.0
|
go.wit.com/toolkits/tree v0.13.0
|
||||||
go.wit.com/widget v1.1.6
|
go.wit.com/widget v1.1.7
|
||||||
)
|
)
|
||||||
|
|
||||||
require go.wit.com/dev/davecgh/spew v1.1.4 // indirect
|
require go.wit.com/dev/davecgh/spew v1.1.4 // indirect
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -6,5 +6,5 @@ go.wit.com/log v0.5.6 h1:rDC3ju95zfEads4f1Zm+QMkqjZ39CsYAT/UmQQs7VP4=
|
||||||
go.wit.com/log v0.5.6/go.mod h1:BaJBfHFqcJSJLXGQ9RHi3XVhPgsStxSMZRlaRxW4kAo=
|
go.wit.com/log v0.5.6/go.mod h1:BaJBfHFqcJSJLXGQ9RHi3XVhPgsStxSMZRlaRxW4kAo=
|
||||||
go.wit.com/toolkits/tree v0.13.0 h1:9HvZVKADIBdUC9b36K0WcMKoWxZeptIxDP0YnLh4rtg=
|
go.wit.com/toolkits/tree v0.13.0 h1:9HvZVKADIBdUC9b36K0WcMKoWxZeptIxDP0YnLh4rtg=
|
||||||
go.wit.com/toolkits/tree v0.13.0/go.mod h1:G5OJt3Tv2OBbpEHDQ1f8KVmJYTw7ZS67/nnkkmgBu9c=
|
go.wit.com/toolkits/tree v0.13.0/go.mod h1:G5OJt3Tv2OBbpEHDQ1f8KVmJYTw7ZS67/nnkkmgBu9c=
|
||||||
go.wit.com/widget v1.1.6 h1:av2miF5vlohMfARA/QGPTPfgW/ADup1c+oeAOKgroPY=
|
go.wit.com/widget v1.1.7 h1:Gy84I2bD8CMna7NcKBX4sRLR8do6x6mVYX0Ui43f3is=
|
||||||
go.wit.com/widget v1.1.6/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ=
|
go.wit.com/widget v1.1.7/go.mod h1:I8tnD3x3ECbB/CRNnLCdC+uoyk7rK0AEkzK1bQYSqoQ=
|
||||||
|
|
Loading…
Reference in New Issue