NullReferenceException While Intializing NExplorerBar


Author
Message
Eshar Gal
Eshar Gal
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1
Maybe I'm just doing something wrong, I have no idea.

/////////////////////////////////////////////////////////////////////////////
var rates = from rate in MainForm.readData.Rates
orderby rate.ValidFrom descending
select rate;

int counter = 1;


foreach (CViwer.Rate row in rates)
{
NBand band ;

NExplorerBar explorerBar = new NExplorerBar();//NullReferenceException
Console.WriteLine(counter.ToString());
counter++;


bool yearExists = false;

foreach (Control c in panelBar.Controls)
{
NBand cBand = (NBand)c;
if (cBand.Caption == row.ValidFrom.Year.ToString())
{
band = cBand;
explorerBar = (NExplorerBar)band.Tag;
yearExists = true;

break;
}
}

if (!yearExists)
{

band = new NBand();
band.Caption = row.ValidFrom.Year.ToString();
band.TextAlign = HorizontalAlignment.Center;
panelBar.Controls.Add(band);

explorerBar = new NExplorerBar();
explorerBar.Dock = DockStyle.Fill;
band.Controls.Add(explorerBar);
band.Tag = explorerBar;
}

NExpander nexpender = new NExpander();
nexpender.Text = "Expander " + row.Id.ToString();

Rates ratesForm = new Rates();
nexpender.Height = ratesForm.Height + 35;

ratesForm.Location = new Point(0, 30);

nexpender.Controls.Add(ratesForm);
nexpender.State = ExpanderState.Collapsed;
explorerBar.Controls.Add(nexpender);

}

}

A first chance exception of type 'System.NullReferenceException' occurred in Nevron.Presentation.dll
System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/UnhandledUnhandled exceptionCViwer.vshost.exeSystem.NullReferenceException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Object reference not set to an instance of an object. at Nevron.UI.WinForm.Controls.NSkinManager.lIIIll111()
at Nevron.UI.WinForm.Controls.NSkinManager.UnregisterSkinnableInstance(INSkinnableControl control)
at Nevron.UI.WinForm.Controls.NExplorerBar.PerformDispose(Boolean disposing)
at Nevron.UI.WinForm.NControl.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()
System.NullReferenceException: Object reference not set to an instance of an object.
at Nevron.UI.WinForm.Controls.NSkinManager.lIIIll111()
at Nevron.UI.WinForm.Controls.NSkinManager.UnregisterSkinnableInstance(INSkinnableControl control)
at Nevron.UI.WinForm.Controls.NExplorerBar.PerformDispose(Boolean disposing)
at Nevron.UI.WinForm.NControl.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()

/////////////////////////////////////////////////////////////////////////////


It will happen every time at a different spot anywhere after 200 as far as i can see.
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.1K

Hello Eshar,

Do you receive this error if there is no skin applied?



Best Regards,
Nevron Support Team


Eshar Gal
Eshar Gal
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)
Group: Forum Members
Posts: 5, Visits: 1
Hi,

Not sure if i know how to do this, what i was doing is adding NSkinManager.Instance.Enabled = false; Something did changed, I'm getting some native code pointer exception now or it will just crush.

To be honest, I'm not sure if i really want to pull 500 controls on the form. It is just something I'm playing around with and was wondering maybe I was doing something wrong.

Thanks.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic
1 active, 1 guest, 0 members, 0 anonymous
No members currently viewing this topic!

Login

Explore
Messages
Mentions
Search