dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pnet-developers] wx.NET not working with P.NET


From: Rhys Weatherley
Subject: Re: [Pnet-developers] wx.NET not working with P.NET
Date: Tue, 1 Apr 2003 12:55:44 +1000
User-agent: KMail/1.4.3

On Tuesday 01 April 2003 12:50 pm, Bryan Bulten wrote:

> For example:
>
>       public static readonly int Help = wxEvent_EVT_HELP();
>
> Where wxEvent_EVT_HELP() is a call to the external wrapper library via
> PInvoke.  Help is not being set correctly before a static contructor
> that uses Help is called; therefore resulting in bad values being used.

Static initializer execution order can be psychotic even under ideal 
circumstances, but we'll investigate.  In the meantime, would it be possible 
to change "Help" into a static property instead?  e.g.

public static int Help { get { return wxEvent_EVT_HELP(); } }

This should break the ordering problems, without requiring any changes to the 
code that uses "Help".

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]