Skip to content

Commit

Permalink
Merge pull request #15 from webability-go/late-night
Browse files Browse the repository at this point in the history
patch v0.0.14
  • Loading branch information
metalwolf committed Apr 14, 2020
2 parents eae40f0 + bc1bd1c commit 86627c8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -20,7 +20,11 @@ TO DO:
Version Changes Control
=======================

v0.0.12 - 2020-04-13
v0.0.14 - 2020-04-13
------------------------
- Correction on node: HELP as messages, not help children

v0.0.13 - 2020-04-13
------------------------
- Correction on node: JSON Marshal, wrong ',' calculations (again)

Expand Down
20 changes: 17 additions & 3 deletions node.go
Expand Up @@ -136,22 +136,36 @@ func (n *Node) GetAttributes() Attributes {
}

func (n *Node) AddHelp(tooltip string, title string, description string) {
if tooltip == "" && title == "" && description == "" {
return
if tooltip != "" {
m := NewMessage("helpsummary", tooltip)
n.children = append(n.children, m)
}
if title != "" {
m := NewMessage("helptitle", title)
n.children = append(n.children, m)
}
if description != "" {
m := NewMessage("helpdescription", description)
n.children = append(n.children, m)
}
return

h := NewHelp(tooltip, title, description)
n.children = append(n.children, h)
}

func (n *Node) AddMessage(name string, value string) {
if value == "" {
if name == "" || value == "" {
return
}
m := NewMessage(name, value)
n.children = append(n.children, m)
}

func (n *Node) AddEvent(name string, code string) {
if name == "" || code == "" {
return
}
e := NewEvent(name, code)
n.children = append(n.children, e)
}
Expand Down
2 changes: 1 addition & 1 deletion wajaf.go
Expand Up @@ -7,7 +7,7 @@
package wajaf

// VERSION is the used version nombre of the XCore library.
const VERSION = "0.0.13"
const VERSION = "0.0.14"

// LOG is the flag to activate logging on the library.
// if LOG is set to TRUE, LOG indicates to the XCore libraries to log a trace of functions called, with most important parameters.
Expand Down

0 comments on commit 86627c8

Please sign in to comment.