On 04/02/11 15:56, Miklos Espak wrote:

> class UserInterface {
> public:
>    UserInterface();
>    Fl_Double_Window *consoleWindow;
>    void show();
> };
>
> UserInterface::UserInterface() {
>    { consoleWindow = new Fl_Double_Window(345, 175);
>      consoleWindow->user_data((void*)(this));
>      { new Fl_Box(80, 35, 25, 25, "Hello");
>      } // Fl_Box* o
>      consoleWindow->end();
>    } // Fl_Double_Window* consoleWindow
> }

I have no view on why the code might fail (I have not even tried it, but 
actually it more or less looks OK) however I would say that rather than 
making your consoleWindow a member of UserInterface, I'd be inclined to 
derive UserInterface from Fl_Double_Window directly.

That makes *a lot* of other things easier later - e.g. you would not 
need to derive your own show() method...



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

Reply via email to