[haiku] BWindow pointer

  • From: Chris Moore <chris@xxxxxxxxxxxxxxx>
  • To: <haiku@xxxxxxxxxxxxx>
  • Date: Fri, 23 Mar 2012 13:52:33 +0000

Hi,

I'm having a headache trying to use a BWindow subclass as an instance variable.

I've got a main window class (MainWindow) that has a private instance variable of another BWindow subclass (CredentialsWindow).
In the header, I've got this:

private:
           CredentialsWindow     *credWin;

In the MainWindow class, if I add this to the constructor:
credWin = new CredentialsWindow();

Then in another method, I try
credWin->Show();

It freezes... However, if I do both the initialisation and Show() as a local variable, it works fine.

Any ideas?

Thanks,
Chris

Other related posts: