timoch
10-08-2006 22:28:29
Hi
I'm having trouble registering event handlers for objects on a layout loaded window
Let's say I created a FrameWindow with an Editbox named 'commandline'
Now I do the following to load the window :
I get an invalid cast exception on the second line. I understand that SWIG does not retain the hierarchy b/w class Window and Editbox.
My question is : Is there an easy way to get a correctly typed window ?
I guess the solution would be to build the typed window using construtors like Editbox(IntPtr cPtr, bool cMemoryOwn) but I don't know how to do it easily (meaning without meddling with SWIG interface files and rebuilding the wrapper)
Thank in advance
Any help appreciated
TiMoch
I'm having trouble registering event handlers for objects on a layout loaded window
Let's say I created a FrameWindow with an Editbox named 'commandline'
Now I do the following to load the window :
mWindow = WM.LoadWindowLayout("consolewindow.layout");
Editbox commandline = (Editbox) mWindow.getChild("commandline");
commandline.KeyUp += new KeyEventDelegate(commandline_KeyUp);
I get an invalid cast exception on the second line. I understand that SWIG does not retain the hierarchy b/w class Window and Editbox.
My question is : Is there an easy way to get a correctly typed window ?
I guess the solution would be to build the typed window using construtors like Editbox(IntPtr cPtr, bool cMemoryOwn) but I don't know how to do it easily (meaning without meddling with SWIG interface files and rebuilding the wrapper)
Thank in advance
Any help appreciated
TiMoch