DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2101
Version: 1.3-current


Using Ian's example and adding a second window and some
output widgets in addition to input, I can get it to crash
right away.

There's probably more widgets here than necessary, but it's probably
useful for debugger tests to coerce the crash.

---- snip
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Output.H>
#include <stdio.h>

Fl_Double_Window *win1 = 0;
Fl_Double_Window *win2 = 0;
Fl_Input  *in1 = 0;
Fl_Input  *in2 = 0;
Fl_Input  *in3 = 0;
Fl_Input  *in4 = 0;
Fl_Input  *in5 = 0;
Fl_Input  *in6 = 0;
Fl_Output *out1 = 0;
Fl_Output *out2 = 0;
Fl_Button *but1 = 0;

void update_text(void *) {
    static char message[128];
    static int count = 0;
    count++;
    sprintf(message, "String Number %d", count);
    in1->value(message);
    in4->value(message);
    out1->value(message);
    out2->value(message);
    Fl::repeat_timeout(0.5, update_text);
}

void OpenDialog_CB(Fl_Widget*,void*) {
   win2->show();
}

int main(int argc, char **argv) {
    // MAIN WINDOW
    {
        win1 = new Fl_Double_Window(522, 210, "Window #1");
        in1 = new Fl_Input(100, 10, 300, 25, "Changes");
        in2 = new Fl_Input(100, 40, 300, 25, "Fixed #1");
        in2->value("Fixed Text Here");
        in3 = new Fl_Input(100, 70, 300, 25, "Fixed #2");
        in3->value("More Fixed Text Here");
        out1 = new Fl_Output(100, 100, 300, 25, "Output");
        but1 = new Fl_Button(100,130,150,25,"Push For Dialog");
        but1->callback(OpenDialog_CB);
        win1->end();
    }
    // SECONDARY WINDOW WITH INPUT/OUTPUT
    {
        win2 = new Fl_Double_Window(522, 210, "Window #2");
        win2->begin();
        in4 = new Fl_Input(100, 10, 300, 25, "Changes");
        in5 = new Fl_Input(100, 40, 300, 25, "Fixed #1");
        in5->value("Fixed Text Here");
        in6 = new Fl_Input(100, 70, 300, 25, "Fixed #2");
        in6->value("More Fixed Text Here");
        out2 = new Fl_Output(100, 100, 300, 25, "Output");
        win2->end();
    }
    win1->show(argc, argv);
    Fl::add_timeout(0.1, update_text);
    return Fl::run();
}
---- snip


Link: http://www.fltk.org/str.php?L2101
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to