NullReferenceException on Frame creation
Kris Luyten <[email protected]> Sat, 28 Aug 2004 01:05:41 +0200
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I am working on an application that can load different widget sets at
runtime to dynamically create a GUI for .Net applications from an
XML-file (the app is "uiml.net"). I was trying to update the
preliminary Wx.Net backend we wrote, and got the following error.
The following code throws a NullReferenceException (full source:
http://cvs.sourceforge.net/viewcvs.py/uimldotnet/uiml.net/Uiml/Rendering/WXnet/WxRenderedInstance.cs?view=markup)
:
=========
class ContainerFrame : Frame
{
public ContainerFrame(string title) : base(null, -1, title,
wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{
}
}
=========
Notice this is a "container' Frame that is used to be filled up with
widgets after it is created.
This is the error I get:
=========
System.NullReferenceException: Object reference not set to an instance
of an object
in (unmanaged) (wrapper managed-to-native) wx.Frame:wxFrame_ctor ()
in <0x00004> (wrapper managed-to-native) wx.Frame:wxFrame_ctor ()
in <0x00010> wx.Frame:.ctor
(wx.Window,int,string,System.Drawing.Point,System.Drawing.Size,long,string)
in <0x0003e> wx.Frame:.ctor
(wx.Window,int,string,System.Drawing.Point,System.Drawing.Size,long)
in [0x00014] (at
/home/kris/projects/uiml.net/Uiml/Rendering/WXnet/WxRenderedInstance.cs:74)
Uiml.Rendering.WXnet.ContainerFrame:.ctor (string)
in [0x0001e] (at
/home/kris/projects/uiml.net/Uiml/Rendering/WXnet/WxRenderedInstance.cs:46)
Uiml.Rendering.WXnet.WxRenderedInstance:.ctor (string)
in [0x00006] (at
/home/kris/projects/uiml.net/Uiml/Rendering/WXnet/WxRenderer.cs:68)
Uiml.Rendering.WXnet.WxRenderer:Render (Uiml.UimlDocument)
=========
My .Net system description:
kris@kris:~/projects/uiml.net/Uiml$ mono --version
Mono JIT compiler version 1.1.1, (C) 2002-2004 Novell, Inc and
Contributors. www.go-mono.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV : normal
Globalization: ICU
on Debian GNU/Linux
Has anyone an idea what can cause the NullReferenceException in the
Frame constructor?
Regards,
Kris
--
uiml.net: research.edm.luc.ac.be/kris/projects/uiml.net/
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click