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 
removing/replacing widgets
Author Message
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #1
RE: removing/replacing widgets

I found the issue !! :-)

Again, Linux being a little sensitive about the sequence.

This was tested on both Windows and Linux and never segfaults.

Code:
local object = fltk:Fl_Double_Window(200, 100);

window = object;

button1 = fltk:Fl_Button(25, 25, 150, 25, "Remove Button");
button2 = fltk:Fl_Button(25, 60, 150, 25, "Will go");

function remove_callback(data)
  window:remove(button2)
  Fl:delete_widget(button2)
  window:redraw()
  button2=nil
end

button1:callback(remove_callback)

window:show();
Fl:run();

This post was last modified: 06-30-2007 10:08 AM by JohnMurga.

06-30-2007 10:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
removing/replacing widgets - mikshaw - 06-29-2007, 02:01 AM
RE: removing/replacing widgets - JohnMurga - 06-29-2007, 06:26 AM
RE: removing/replacing widgets - JohnMurga - 06-29-2007, 07:43 AM
RE: removing/replacing widgets - mikshaw - 06-29-2007, 08:26 AM
RE: removing/replacing widgets - JohnMurga - 06-30-2007 10:06 AM
RE: removing/replacing widgets - mikshaw - 06-30-2007, 04:49 PM
RE: removing/replacing widgets - JohnMurga - 06-30-2007, 07:36 PM

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

Forum Jump: