Problems with a simple application

Raúl Moratalla <[email protected]> Mon, 20 Sep 2004 19:23:33 +0200
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <[email protected]>
Hi, I am developing an application using wxWidgets. I made an small 
application test that load a XRC file, but now it doesn't works.
This is the error:

Unhandled Exception: System.TypeInitializationException: An exception was 
thrown by the type initializer for wx.Event ---> 
System.EntryPointNotFoundException: wxEvent_EVT_COMMAND_TAB_SEL_CHANGED
in <0x00053> (wrapper managed-to-native) 
wx.Event:wxEvent_EVT_COMMAND_TAB_SEL_CHANGED ()
in <0x00af9> wx.Event:.cctor ()
--- End of inner exception stack trace ---

in (unmanaged) wx.EvtHandler:.ctor (intptr)
in <0x000c3> wx.EvtHandler:.ctor (intptr)
in <0x0001b> wx.App:.ctor ()
in <0x0000a> lphantWx.lphantWx:.ctor ()
in [0x0000a] (at /home/raul/Compilar/lphantWx/lphantwx.cs:40) 
lphantWx.lphantWx:Main ()

I was able to start the application. I have tried to debug it but I don't know 
the problem that causes it.

This is the source code:

using System;
//using System.Drawing;
using wx;

namespace lphantWx
{
	public class lphantFrame : Frame
	{
			public lphantFrame()
			: this( null ) {}
			
		public lphantFrame (Window parent)
		{
		Console.WriteLine("fin");
		}
		
	}
	
	public class lphantWx : App
	{
		public override bool OnInit()
		{
			Console.WriteLine("inicio handlers");
			wx.Image.InitAllHandlers();
			XmlResource.Get().InitAllHandlers();
			/*wx.Image.InitAllHandlers();
			XmlResource.Get().InitAllHandlers();
			XmlResource.Get().Load("/home/raul/Compilar/elephantWx/elephantWx.xrc");
			
			elephantFrame frame = new elephantFrame();
			frame.Show(true);*/
			return true;
		}
	
		
		[STAThread]
		static void Main()
		{
			Console.WriteLine("vamos a ver");
			lphantWx app = new lphantWx();	
			Console.WriteLine("no va??");
			//app.Run();
		}
	}
}

It crashes in line: "lphantWx app = new lphantWx();	"


I will be very glad if someone could help me.

Regards,

Raúl
-- 
----------------------------------------------------------------------------------------------
http://raulmoratalla.webcindario.com

La web con información sobre Suse Linux y programación.

Raúl Moratalla
----------------------------------------------------------------------------------------------


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php