On 30.09.2012 21:20, caspar wrote:
> Hi,
>
> I'm beginning to port my code over to version 3.0 - slowly as it's still 
> experimental at the moment.
>
> What's sticking at the moment is the order of calling show() seems to be 
> different and is causing a bit of a problem.
>
> In the fltk 2 version of the code I do:
>
> pWindow = CreateMainWindow();
> pWindow->Begin();
>
> // build some other UI elements (A tile group containing a GLwindow)
> CreateInterface();
>
> pWindow->End();
> pWindow->Resizable(theTileGroup);
> pWindow->Show();
>
> // create the GL context
> pGLWindow->MakeCurrent();
>
> This works fine under fltk 2
>
> Under 3.0 I see that the win32 context stuff set at pWindow->i internally 
> isn't created until pWindow->show() is called, and the GLWindow will crash.
>
> So for the fltk 3 build I have to call pWindow->show() before the GLWindow is 
> created - but this results in the outer pWindow not being resizable anymore...
>
> Any help appreciated.

I'm sorry that I can't help much - the only one who can probably
give more help about the internals of fltk 3 (and maybe in some
extent also of fltk 2) is Matt. fltk 3 internals are more or less
inherited from fltk 1.3, so they may be different than fltk 2.
Also, as you wrote yourself, fltk 3 is still in beta state, and
you should not expect this to change really soon.

That said, if the only the problem is the resizable window, then
I suggest to set the resizable to the window itself before show(),
and maybe change it later after you added theTileGroup as required.
This should probably work.

One more question, though: Is your code from a real program, or
is it hand-written pseudo code? I wonder how "End()", "Begin()",
"Resizable()" with capital first letters could work. Macros?

-- 

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to