Event table confusions..... was "confusion over members..."

Rory Walsh rorywalsh at ear.ie
Fri Nov 3 09:35:26 PST 2006


> I don't think loopStation is being initialized.  Looking at your event 
> table declaration, is it your intent to have the OnNew method called for 
> an ID_MENU_QUIT event?  

Yes. I just put this example together from a wxWidgets template which is 
why I'm using an identifier called ID_MENU_QUIT for something other than 
quitting......

>Is anything being called for ID_NEW event?  I 

No.

> see the only place you initialize loopStation is in OnNew, so I'm 
> guessing it is never being called.

It's called whenever I hit "New" in the file menu. It must be getting 
called as it causes a wxMDIChildFrame to appear on screen, how could it 
appear if the constructor for loopStation never gets called? Further 
proof that it is initialised is that if I call 
loopStation->text->GetValue());
from one a wxWidgetFrame menu command it works fine, i.e., I get a three 
popping up in a message box. Thanks for your suggestions, any other ideas?

Rory.





More information about the wx-users mailing list