Forum: Site News
Topic: LuaFLTK Tutorial
started by: roberts
Posted by roberts on July 20 2006,23:54Now posted in the < documentation > section:
Created by our very own, mikshaw.
A very cool Lua 4.0 / FLTK live demo, reference, template like system to help fill the need for the "missing Lua/FLTK manual"
Use the standard method, mydsl-load. Enjoy. Thanks, mikshaw.
Posted by mikshaw on July 21 2006,02:10
I'm still eternally tweaking it, of course.
Some things I'm presently attempting to deal with....
1) The display window is a multiline input so that it can be edited, but input apparently does not allow you to jump automatically back to the first line, so it initially displays the bottom portion of the script. Input also does not allow keyboard use of buttons (input always retains focus for some reason), so there is currently little keyboard support. I'm working to fix both of these issues by using a Hold_Browser instead of Multiline_Input. This will just make saving an edited file a little more complicated (for me, not you), and editing itself will be done in a separate field, which may seem unnatural for some people.
2) Currently overwrites any existing file without confirmation during a save, and doesn't let you know when the target file is not writeable...these will be fixed eventually.
3) I don't like the idea of using a wrapper of one language to manage a script of another language...hope to get that sorted out soon so i can reduce and simplify.
4) I have a need to make applications as keyboard-friendly as possible. Lua-FLTK is not the keyboardiest thing available, but it's not too shabby. I still have a lot of work to do here.
Posted by MaxiJavi on Aug. 17 2006,10:01Have you guys seen murgaLua ?
< http://www.murga.org/devPages/murgaLua/index.html >
It is based on recent versions of Lua and Fltk and seems to be a little nicer than luaFltk.
The downside is that it comes bundled with an old (?) version of SqLite.
Posted by mikshaw on Aug. 17 2006,12:59I had never heard of it. Thanks. I'm definitely going to check it out. I've been hoping that lua-fltk would be in continuing development (using newer fltk, implementing more widgets and completing some of the unfinished ones), but so far no changes since the first release in 2001.
The inclusion of sqlite is something i could do without, but 500k isn't bad at all.
Posted by mikshaw on Aug. 18 2006,13:10My initial impressions....
It needs a little work, but overall is much more flexible than lua-fltk while being only slightly larger.
It should be rebuilt for DSL, to work with the older xft and png libraries, and maybe to use the existing sqlite.
It also has what appears to be a bug, which should have been obvious to the developer. In both DSL and Suse (haven't tested in Slackware yet) the examples which include "murgaLua.*" fail with a message attempt to index global 'murgaLua' (a nil value). Maybe there's something else that needs to be done, but I haven't seen any mention of it.
Posted by JohnMurga on Aug. 19 2006,07:26Hi,
Thanks for the feedback ...
I am the developer ;-)
There aren't any examples that include "murgaLua.*" ... If there where I'd expect you get this message. What did you get this error with ?
** EDIT - I think the Linux binary in the archive may have been out
** of date, did you have problems with the xml and dir progs ?
My testing so far has been with Mepis, Puppy and WinXP.
I did find some build bugs and released an updated package yesterday.
Building it for the older xft and png libraries won't be a problem (what is the best build environment for DammSmall?), however, I think the sqLite lib in DammSmall may be incompatible with one I use which is a little smaller.
Please send me a mail to firstname.lastname@example.org if you have any more feedback/issues.
I'd be keen for this to be used in DammSmall, so I'll be happy to help.
Posted by JohnMurga on Aug. 19 2006,11:31I have updated the archive at :
< http://www.murga.org/devPages/murgaLua/murgaLua-0.1.tar.gz >
It now has internal PNG support and I have included a "_nonXft" version so that that it will work on distros like DammSmall.
I also gave it a quick test on DammSmall and it seems to work OK.
Posted by mikshaw on Aug. 19 2006,14:42
Downloading now, playing this afternoon. Thank you for doing this!
Posted by mikshaw on Aug. 20 2006,01:07Ok, it seems to be working spendidly. Thanks.
Now my problem is that I don't know how to use Lua 5 =o)
EDIT: After taking a quick look through the 5.1 manual, it seems like it won't be too big a jump. The syntax seems pretty much the same, but there are many more functions and many of them are called a little differently. For example, if you want to get the environment variable "HOME" you'd use os.getenv("HOME") instead of getenv("HOME"). Should be a pretty simple transition.