Hi All
I'm trying to port a C# application to MONO@Linux.
All is working now (better than in windows) except for the ocasional crash
at: System.Windows.Forms.XEventQueue+PaintQueue.Dequeue () .
(Complete Stack trace bellow).
The nature of the application makes this a terrible problem, because
On 01.11.2010 16:56, Stifu wrote:
>
> Although you managed to work around your problem, if you think there is a bug
> in Mono, feel free to file a bug report.
ActiveForm is null when the application does not have focus, i.e.
it's not activated in Windows parlance. A click on the desktop
is enough
Although you managed to work around your problem, if you think there is a bug
in Mono, feel free to file a bug report.
luisrl wrote:
>
> I changed ActiveForm.Controls for this.Controls and now it works fine in
> Ubuntu.
>
> foreach (Control ctl in this.Controls)
> {
>if (ctl.GetType() == t
I changed ActiveForm.Controls for this.Controls and now it works fine in
Ubuntu.
foreach (Control ctl in this.Controls)
{
if (ctl.GetType() == typeof(TextBox))
{
ctl.Text = string.Empty;
}
}
--
View this message in context:
http://mono.1490590.n4.nabble.com/object-reference-not-s
I tried:
if (ActiveForm == null)
{
MessageBox.Show("activeform null");
}
And it shows the message; so, the activeform is null.
--
View this message in context:
http://mono.1490590.n4.nabble.com/object-reference-not-set-to-an-instance-of-an-object-tp3019792p307.html
Sent from the Mono -
Most likely it is ActiveForm.Controls.
Check before this code with:
if (ActiveForm == null)
Console.WriteLine ("activeform null");
Jonathan
On 10/29/2010 4:31 PM, luisrl wrote:
>
> I'm getting the next exception:
>
> object reference not set to an instance of an object
>
> In the next code
I'm getting the next exception:
object reference not set to an instance of an object
In the next code:
foreach (Control ctl in ActiveForm.Controls)
{
if (ctl.GetType() == typeof(TextBox))
{
ctl.Text = string.Empty;
}
}
This is happening in Ubuntu 10.04 + Mono 2.8, in Windows