Thursday, March 27, 2014

Usbong Update (March 26, 2014): Load/Store Variables = OK

Hi everyone,
Here's the latest update on Usbong.

Task accomplished:
+store/load variables
--> for example, if you have a node that asks the person's name, you can then access and use the entered name in the succeeding nodes
--> Based on end-user requests

1) Sample (Store):
textField~@name=getInput()~What's your name?

where:
"@name" = name of the variable; this can be any name (e.g. @abc); Remember to add the "@" mark before the variable name
"=getInput()"  = assigns the entered value in the node onto the variable

//Note:
You should put "@name=getInput()" before the node name (i.e. What's your name?), and delimited by "~" (tilde).
textField~@name=getInput()~What's your name?

2) Sample (Load):
textDisplay~{@name}? Your name is {@name}? Coolness!

You can load the value of the variable by putting {@name} in the node name, where "@name" is the name of the variable. Remember to add the curly braces (i.e. "{" and "}")
textDisplay~{@name}? Your name is {@name}? Coolness!


Load and Store have been tested to work with textField and textArea.
It should also work with other nodes, but it wouldn't make much sense to get the entered input of nodes that merely display text or images, because they would be blank.

If a variable cannot be found in memory, 
its value will be: "variable_not_found"

For a complete sample Usbong tree (.xml),
you may download: load_store_sample.xml

If you encounter any issues, etc.,
please don't hesitate to let me know.
You may also get in touch with me 

As for the latest source code,
you may check it out at:

Regarding the .apk update,
it should be available for download
within a few hours after this email.

I'll update the guides accordingly then.

This is all for now.

Cheers,
Mike