On 12 Jul 2008, at 0:37, huda wrote:
> I have a problem with writing with "Fl_Multiline_Output"
> when i use a "message" function it does not work, i do not know
> why ???
I've been trying to guess where you might have intended to call your
message() function from - I suppose it would need to be called at the
end of load_file() ?
Anyway, it seems as if this will not work:
> /*====Message will write the history of all pressed
> commands=========*/
> void message()
> {
> extern Fl_Multiline_Output *text_output;
> extern Fl_Button *button;
> extern void clear_text();
>
> //here need to write that the robot sart--------------in the
> case of start connection
> if (button->value()==1){
I am assuming that this function is called from the load callback? If
so, it seems likely that this test will always fail, since the
callback is triggered when the button is released. Therefore, at the
point at which this code runs, the button value will always be zero,
so you will always execute the clear_text() code path instead.
Is that perhaps what has been happening?
> printf("good Try");
> text_output->value("Load start work \n\n Don't worry this is
> only a test ");
> }
> else
> {
> clear_text();
> }
>
> }
>
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk