Lukasz wrote:
> This is for your amusement.
> 
> 1)In my program there is a class whose first private element is "offscreen 
> scr". Program compiles and runs wwith no problems. However, if I add another  
> private element to the class (and do nothing with it!), which is _before_ 
> offscreen scr (I know it absolutely shouldn't have any influence whatsoever) 
> the program compiles but there is an error
> 
> X_PolySegment: BadDrawable (invalid Pixmap or Window parameter) 0x2c30352e
> 
> at runtime.

Look for uninitialized variables. In your recent example program, you didn't 
initialize exactly this private variable Fl_Offscreen scr;

I tested your previous example and found that you could simply add

scr = 0;

in your plot_box constructor, and everything works as expected, even with the 
statement

fl_draw("test",10,10);

uncommented. However, this draws black text on a black background.

Add fl_color(FL_RED); before fl_draw(...), and you will see that your example 
works.

> 
> 2) In my program I have a window with 17 Fl_Boxes as childs. I have a "for" 
> loop which initializes them which starts like "for(int i=0;i<17;i++)". 
> Everything works fine. If I change 17 to 15 everything still works fine, but 
> if I change to 16 situation is as in 1) (and nothing else is done with these 
> Fl_Boxes, they're aboslutely isomorphic).
> 
> :-)))

This looks very much like a problem with uninitalized variables.

> I'm not feeling like preparing short programs which demonstrate these issues 
> since I'm not sure how long would it take. However, if anybody's interested I 
> can post whole program somewhere.

Without sources, everybody can only guess.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to