Cross-platform SDK and HTML5 tools for mobile app development

MobileLua update

1 post / 0 new
Last post
Mikael Kindborg
miki's picture
Mobile Sorcerer
Joined: 29 Jun 2010
MobileLua update

MobileLua is now updated to work well with MoSync 3.0 and on Windows Phone. There are also new examples that demonstrate how to use NativeUI in Lua. The MobileLua project is found on GitHub:

New is that all MoSync-related functions and objects are in a global table named "mosync", which puts them in their own namespac.

When you previously wrote "maVibrate(500)", you now write "mosync.maVibrate(500)". If you think "mosync" is too long, you can invent your own prefix, like this:

{syntaxhighlighter brush: cpp;fontsize: 100; first-line: 1; }mo = mosync


If you don't want to use any prefix at all, you need to assign names to the functions you want to use one-by-one, like this:

{syntaxhighlighter brush: cpp;fontsize: 100; first-line: 1; }maVibrate = mosync.maVibrate


Combining JavaScript and Lua is a very powerful option, you can then do the user interface in HTML/CSS, write code in JavaScript, and directly evaluate Lua code from JavaScript. There is a blogpost/video about this:

Here is an example program that uses this technique:

Best regards, Mikael