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.
That was a major struggle with several versions of iGame3D.

What tended to happen was what seemed like a perfect single window solution fell to pieces the moment a more complicated action was developed and included.

Just thinking of all the iterations I've gone through wears me down.
Don't let it happen to you. :-)
I saw something that sounds similar to your bug yesterday. I had opened a preview window while running my window manager in "float" mode (it's usually tiled, so windows never overlap). The preview window completely covered the main window, and when I pressed Esc to close the preview the main window was gone as well, but the application was still running. I haven't been abe to recreate that situation since then.

One thing I was thinking about was the possibility of having the preview replace the current widget group in the main window instead of using loadstring() to open it in a new window (I don't really understand how loadstring works anyway). This _might_ fix the problem.

Recent changes:

Requires murgaLua 0.5.5

Using Fl_Text_Display and Fl_Text_Editor instead of Fl_Multiline_Output/Fl_Multiline_Input to display code and other text. This gives a much more pleasant interface, including scrollbars.

Started messing with drawing functions. I have most of the "fast shapes" functions covered, but I don't know if the more complicated stuff will be included any time soon.
I tried to include both the circles demo from iGame3D and the draw4 demo from John, but both presented problems due (I assume) to the nested nature of the widget application. Instead I made a new button-driven script which was based on the draw4 script. The draw4 demo works, but since it's on a loop it presents a problem when viewing the source while it's running (the drawings continue to draw over the text field). The circles demo segfaults (the version that doesn't segfault for me when running in its own window), and I haven't figured out why.

The FLTK manual was removed, since it is already included with murgaLua. That cut the package size down considerably...several hundred Ks.

The "edit code" menu item opens the code in a new window in Fl_Text_Editor instead of allowing edits to the "view code" display. The save and preview functions have been moved to this window. This allows me to use the same Fl_Text_Display for read-only viewing of all text, and moves the editable stuff to a whole different window.

Added some bitmap widgets, Fl_XBM_Image, Fl_XPM_Image, Fl_Tiled_Image, and initial tests of Fl_Bitmap. I'm hoping Fl_Gif_Image and Fl_Pixmap will be supported eventually (nudge, nudge)

Also included: Fl_Chart, align, Fl_File_Browser (incomplete), labetype (seems to be broken?), and Fl_Wizard

Still adding more things each day.
Sounds great mikshaw

Send me the code and I'll look into the issues you are having :-)

We recently experienced back-to-back days of violent, nearly tornado-like storms (extremely rare for New England). I just got the utilities back, so haven't worked on this or any other scripting project in nearly a week.

I'll replace the previous test version with what I currently have next time I look at it.
I made a boo-boo somewhere, and I don't know what it was, but now the notes feature doesn't work properly. The enable/disable of the notes menu item seems to work only for some widgets, and the notes themselves no longer display. I've looked into it a few times with no success...logically it seems that it should work.

If I can't figure it out tomorrow I'll just post it as is.
Its tomorrow, the suspsense is killing me softly.
ok, I didn't actually touch it today, since I had some work to do in the gardens, but here is the current package complete with annoying problems. The previous version has been deleted.
Again, the Lua documentation has been stripped to save a few Ks
(attachment removed)
Its still looking good. I wonder how we can implement syntax coloring.

Your color chooser is slick, and I not that opening/closing new windows doesn't have that "whole window" disappear effect that the widgets in a single window causes.

Now if I could just get into a "i like to read code" trance I might learn something.
This is seriously driving me NUTS!

I have a test for whether or not a *.txt file exists, and the result of this test determines whether or not a specific menu item is enabled. I also have a print("yes it works") command as part of the test, and this print command works every time, in the exact same place that the activate/deactivate command is found. I've gone over and over this at least several dozen times, and it makes no sense to me that the print shows when it's supposed to, but the enabling of the menu item only works sometimes.

As another test, to see if there might be an issue with enabling/disabling a menu item, I created this:

function menu_callback()
if menu:text()=="disable item 1" then itemone:deactivate()
elseif menu:text()=="enable item 1" then itemone:activate()

window = fltk:Fl_Window(400, 200, "menu test")
menu:add("disable item 1")
menu:add("enable item 1")



And of course that works every time.
So i'm throwing this project aside for an indefinite period of time. I'm sick of stuggling with this one stupid issue and sick of looking at this script as a result. I'll get back to it some time later when I feel like abusing my brain.

mikshaw Wrote:
So i'm throwing this project aside for an indefinite period of time. I'm sick of stuggling with this one stupid issue and sick of looking at this script as a result. I'll get back to it some time later when I feel like abusing my brain.

I am away right now, but I am back on Monday and will take a look at this ... If only to abuse my brain :-)


Pages: 1 2 3 4 5 6 7 8 9 10 11
Reference URL's