Murga-Projects Forums

Full Version: [WIP] MurgaLua Reference Tool
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

(very old post) I was thinking, perhaps you want to have a means of exporting the samples and comments to a indexed HTML page(s) for posting to the web. Just a thought.

The more I think about this idea, the more I like it. I think it's going in the todo pile.

It may not be a part of the demo interface itself, but maybe a separate Lua script that will convert the contents of the scripts directory to simple html. I'm still not liking the idea of frames, so it would probably be CSS layout for browsers that support it, and similar to the typical Linux online HowTos for those that don't.

I suppose when I get better with using fl_read_image and saveAsPng I could possibly use those to dynamically create screenshots to include with the html

The external editor has been put back in. It requires the user to either edit the main script or set a variable on the commandline (murgaLua -e "ext_editor=[[something]]" widgets.lua) The added button will load the existing buffer into an external editor, via temp file, and when you close the editor the temp file will be reloaded into the buffer. It was very easy to incorporate it this way, rather than have the external editor be an alternative to the Fl_Text_Editor. I haven't got a clue how I'd do it that way, and don't really want to think about it.

Still want to do some more menu bar work, and maybe one or two small toys. Then I need to bring it back into Windows for a quick test (was pretty thorough with it yesterday).
Beta 4 to come soon.

The more gets added to it, the more it's becoming a general reference tool rather than mainly FLTK widgets. I'm thinking a name change is imminent
Hi mikshaw,

I'll be the first to admit I don't know what I'm doing (and I hereby so admit). Be that as it may, I have a question regarding the clock demo in beta3. I ran the demo with the "show demo" button and it worked fine. However, when I saved the file (along with a copy of the images directory) to my home directory and ran the program, I got the following error:

/usr/local/bin/murgaLua: clocks.lua:20: attempt to concatenate global 'images' (a nil value)
stack traceback:
clocks.lua:20: in main chunk
[C]: ?

so I inserted the line:

images = "images/"

above line 20 in the program and all was well. I guess I was just wondering if the individual demo programs are designed to be totally free-standing or if they deliberately use external global variables?

Bosco Bearbank
Most of them will work fine as-is, but those that use the images directory need the directory added to them (there are 7 or 8 of them, I think).

The old version of the demos package had all of the demos load as part of the main script. While this made some things more convenient, it caused porblems in other areas. The way it is now, any script that can run on its own can be dropped into the script directory without change. The only ones that need a helping hand are the ones that rely on external images.

In order to make the package as portable as possible, specifically so you can put it anywhere you want and not have to be *in* that directory when you run it, the images variable is dynamically set when the main script is run. When you run a demo, the code buffer is copied to a temp file (in order to use any changes you make) and that is run instead of the original script. Here's where the main problem came in...that temp file is no longer in the script directory, so it doesn't know where the images directory is. The main script passes the images variable to the temp demo. When you save the file and run it independently, the variable is not passed to it.

I *could* have saved the variable with every script, but that would be overkill since only a handful of the scripts actually use images.

I'm open to any suggestions for a better solution.
There seems to be a problem with uploads on the forum today, so I wasn't able to put beta4

Current changelog:

* Dropped support for murgaLua below 0.6
* File list split into collapsible sections
* Returned the ability to set a global scheme
* Returned the external editor
* Made columns resizable
* Better keyboard control
* Code cleanup
* Name change from widgets demo to murgaLua demos
* Fixed "show demo" button to not collapse browser on click
* Fixed save button crash on main code (disabled the button)
* Fixed potato drop mouse click test for Windows
* Fixed xpm_file.xpm transparency in Windows
* Added examples:
button roll-over, FLU emulation
Flu_Choice_Group, FLU emulation
collapsible browser
LCD-style number display

I'll try uploading again later tonight.

April 7: still no luck.
Error message:

The file upload failed. Please choose a valid file and try again. Error details: There was a problem moving the uploaded file to its destination.

Weird problem ...

Permissions needed changing after the OS upgrade to the server (how weird!).

Anyway, here the the current you sent me ... I'll delete my post when you update.

I can't believe I let that sit for three years! The original post is now updated with a link to beta 4 =o)

I'm still playing with this here and there for a few minutes at a time, but I haven't done enough with it to justify packing up a new release.

mikshaw Wrote:
I can't believe I let that sit for three years! The original post is now updated with a link to beta 4 =o)

I'm still playing with this here and there for a few minutes at a time, but I haven't done enough with it to justify packing up a new release.


please keep at it, i think MurgaLua, FLTK are very promising and my interest is in that they are antidotes to the bloatware

we had a conversation a while back on this forum, revolving around a screen issue i was seeing in a database application

what is vital here are your demos!!!

so i think it important that the reference guide eventually should cover some of the more tricky and subtle issues, and also serve as a template for how to implement stuff


mikshaw, what OS are you using now ?

I PROMISE 0.7.5 for X-Mas :-)
Debian Wheezy. Can't recall having any issues since switching from DSL/TinyCore, although I might have needed to install a c library other than the default, but that's not an uncommon thing.

Still have access to Windows 7 and maybe Windows XP for some occasional testing.
Pages: 1 2 3 4 5 6 7 8 9 10 11
Reference URL's