Site News :: DSL v4.3



Quote
a) Applying Fl:scheme("plastic") as in calculator.lua to everything written in MurgaLua
There's no need to edit the scripts when you can apply it to every murgaLua GUI in one shot:
http://damnsmalllinux.org/cgi-bin....t=19979

On the subject of flrun, you're attempting to set the value of a menu to a string, when it requires an integer.  If you change input:value() to input:add(), it adds the command to the menu. Is that what you wanted?

Also, the browse callback tries to work with fl_file_chooser directly. This is reliable only if fl_file_chooser always returns a useable value, which is never a certain bet. It's generally a good idea to check whether or not the chooser returns something before doing anything with the result.  For example:
Code Sample
function(browse)
 local txt=fltk.fl_file_chooser(text.choose,"*","")
 if txt then input:add(txt) end
end)

Quote (mikshaw @ May 02 2008,16:00)
Quote
a) Applying Fl:scheme("plastic") as in calculator.lua to everything written in MurgaLua
There's no need to edit the scripts when you can apply it to every murgaLua GUI in one shot:
http://damnsmalllinux.org/cgi-bin....t=19979

On the subject of flrun, you're attempting to set the value of a menu to a string, when it requires an integer.  If you change input:value() to input:add(), it adds the command to the menu. Is that what you wanted?

Also, the browse callback tries to work with fl_file_chooser directly. This is reliable only if fl_file_chooser always returns a useable value, which is never a certain bet. It's generally a good idea to check whether or not the chooser returns something before doing anything with the result.  For example:
Code Sample
function(browse)
 local txt=fltk.fl_file_chooser(text.choose,"*","")
 if txt then input:add(txt) end
end)

Daniel's script used to work. Not sure when it no longer. But many changes and enhancements to murgaLua over the last several releases.

Thanks for the suggestion of scheme "plastic" and thanks to mikshaw for the quick fix to this useful script and of course his suggestion of using LUA_INIT.

Quote
But many changes and enhancements to murgaLua over the last several releases.


I personally find it frustrating that MurguaLua is getting bigger and slower with each release. Copas, XML, md5, ... do we need all of that in DSL? Also murgaLua binary is over 600K and yet has been packed with UPX. UPX combined with the DSL compressed image makes the DSL lua tools slower to start on older hardware.

MurgaLua seems like a real pain to compile because of all the 3rd-party libs and dependencies, but I might try to have a look at it during the weekend. I think we ought to try to build murgaLua for DSL instead of including the standard static build, because some libraries required by murgaLua are already present in DSL (zlib and libsqlite). With our own build, we may get a faster (and perhaps even smaller?) murgaLua even with all the features included. As an added bonus, a non-static build could make the fltk toolkit also available for C/C++ programs.

Quote
I personally find it frustrating that MurguaLua is getting bigger and slower with each release.
I've brought up this issue to the murgaLua developer myself, and he has expressed an interest in streamlining the application in future releases.  There are things in murgaLua that I don't have any use for, but it is intended to be a cross platform tool that provides many uses.  Perhaps we could look into customising it to be dsl-specific and remove anything that doesn't apply to us. Keep in mind, though, that if that was done we'd need to provide the sources for the changes according to the GPL license.

Quote
Perhaps we could look into customising it to be dsl-specific and remove anything that doesn't apply to us.


Yes, perhaps. But as of this weekend, I'm not going to modify murgaLua. I'll just recompiling it into a non-static build and re-use the libs already present in DSL.

By the way, the latest available version on Murgalua site seems to be 0.6.4, but in DSL the latest version is 0.6.8. How can one get the latest version?

Next Page...
original here.