News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
[WIP] MurgaLua Reference Tool
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: [WIP] MurgaLua Reference Tool - a little help?

I'd already broken up this function into two parts in order to fix a crash mentioned earlier, so depending on what changes you've made (is it simply hiding the widget?) it may need a little more work. This is its current state, plus the hide line, though it hasn't been tested:

Code:
function demo_remove_widget()
  if demo_widget then
    demo_widget:hide() -- hide it before removal
    -- remove previous widget
    demo_w:remove(demo_widget)
    Fl:delete_widget(demo_widget)
    demo_widget=nil
  end
end

function demo_replace_widget(new_file)
  demo_remove_widget()
  -- new child window for new widget
demo_widget=fltk:Fl_Double_Window(0,demo_bh,demo_ww,demo_wh-demo_bh,demo_widget_files[i])
  dofile(new_file)
  fltk:Fl_End(demo_widget) -- end for each widget window
  demo_w:add(demo_widget)
  demo_widget:show()
  demo_widget:make_current() -- needed for drawing functions
end

01-09-2008 12:38 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
[WIP] MurgaLua Reference Tool - mikshaw - 07-10-2007, 05:00 PM
RE: [WIP] MurgaLua Reference Tool - a little help? - mikshaw - 01-09-2008 12:38 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: