User Guide


The X button executes your code from the input window (not the save file)

Lua folder
"/opt/usr/home/owner/media/Documents/lua/" if you want to use lua to include/dofile other lua files this is the file path on the watch.

Test button
the test button returns a smiley depending on if your code compiled without errors (from the input, not file).

CLEAR OUTPUT:

to clear the output of all print() lua calls, use printArgs = "" and reversePrint = ""

output errata:
*Output is limited to 20k characters. this is hardcoded and i can update it as requested.

OUTPUT OF PRINT()   :

if you want to use lua's print() in reverse order, just return the lua variable reversePrint which contains the same as printArgs but in reverse.

BUTTON WINDOW:

Button window: "B" (gives error "attempt to call a nil value" if lua function main() does not exist.)
the button window runs main over and over without reloading the environment. juts hit a button.  You can redefine lua wl_benter as your own function if you want. the default prints the variable var_input which comes from the top of the screen.  Please note that printArgs and reversePrint are cleared after the end of press of a button (e.g. the enter button on the view screen). The execution order (send var_input)->(run lua button code)->(lua main)

Lua Button Function return values: do not return values from your lua button functions as they are ignored.

If your lua code has an error in the button code, it will return 'button error' in which case check your code, save it, and try again.

EDIT/SEARCH/REPLACE

Sanity:
For sanity reasons your code is not transferred between views.  if you want to use another view (e/g search or search/replace), save your code and use the load button in that view.  When you are done searching and replacing, test compile it and save the file then return to the main view and hit 'load'.
Every time you leave the Edit view or the Search/Replace view, your code in that window is cleared so save your code on that page and load it into the main window.

AVOID:

*avoid &quot; as well as &lt; and &gt; in your code as these are captured by tizen as quotes, <  and >

ADD A NEWLINE TO STRING:

*to put a newline into a lua string destined for output, add <br> to the end of it.

GO LINE BUTTON:

*The button "Go Line" will grab the line number out of the compiler output when it gives an error and jump to that line in your code.  Pressing this button without compiler output (e.g. code error message) in the output window can be unpredictable depending on what your code outputs.

*Go Line gets it's code from the main window, not from file.

Fonts on your watch and ROGUELIKES:
WristLua works great on Default font for tizen.  A monospace font (e.g. from the watch app Font Manager) works well for running a roguelike in Lua, but some of the text on the menus cant be read which is minor.

No comments:

Post a Comment