autogen gui tables work
This commit is contained in:
parent
abd87346f5
commit
261d54485c
|
@ -26,7 +26,10 @@ func (pb *Files) makeGuiFile(pf *File) error {
|
|||
guiStringFuncs(newf, pf.Package, pf.Bases.Name, pf.Base.Name)
|
||||
|
||||
for _, v := range pf.Base.Vars {
|
||||
// log.Printf("Found %s %s\n", v.VarType, v.VarName)
|
||||
if v.IsRepeated {
|
||||
// can't work against slices
|
||||
continue
|
||||
}
|
||||
if v.VarType == "string" {
|
||||
log.Printf("make Add function here %s %s %s\n", pf.Bases.Name, pf.Base.Name, v.VarName)
|
||||
guiAddFunc(newf, pf.Bases.Name, pf.Base.Name, v.VarName)
|
||||
|
@ -37,10 +40,6 @@ func (pb *Files) makeGuiFile(pf *File) error {
|
|||
if !v.HasSort {
|
||||
continue
|
||||
}
|
||||
if v.IsRepeated {
|
||||
// can't work against slices
|
||||
continue
|
||||
}
|
||||
if v.VarType != "string" {
|
||||
continue
|
||||
}
|
||||
|
@ -111,7 +110,7 @@ func guiMain(w io.Writer, FRUITS string, FRUIT string) {
|
|||
fmt.Fprintln(w, "")
|
||||
fmt.Fprintln(w, "func (mt *"+FRUITS+"Table) ShowTable() {")
|
||||
fmt.Fprintln(w, " log.Info(\"ShowTable() SENDING TO GUI\")")
|
||||
fmt.Fprintln(w, " // mt.MakeTable()")
|
||||
fmt.Fprintln(w, " mt.MakeTable()")
|
||||
fmt.Fprintln(w, " gui.ShowTable(mt.pb)")
|
||||
fmt.Fprintln(w, "}")
|
||||
fmt.Fprintln(w, "")
|
||||
|
|
Loading…
Reference in New Issue