> Jim Wilson wrote: > > Charles West wrote: > > > >> Hello, I am trying to learn how to draw things. Every time I try to > >> run fl_draw_box, I get a segmentation fault. What am I doing wrong? > > > > At first glance, it looks like you're calling the draw() method from > > inside your c'tor. > > > > Normally, you're not in charge of this realm. Your class advertises a > > draw() method, but FLTK decides when to call it. Your program's > > responsibility is to obey FLTK's request. If you want to draw, you must > > beg FLTK with damage() in hopes it intercedes on your behalf. > > Right. Documentation wise, see: > http://fltk.org/documentation.php/doc-1.1/drawing.html#drawing > > ..specifically: > "There are only certain places you can execute drawing code in FLTK. > Calling these functions at other places will result in undefined > behavior!" > > For some simple examples, see eg: > http://seriss.com/people/erco/fltk/#FltkX
I think I understand it now. Thank you. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

