Profile Picture

NDockingToolbar.MakeDocked NullReferenceException in 13.7.16.12 build

Posted By Craig Swearingen 8 Years Ago

NDockingToolbar.MakeDocked NullReferenceException in 13.7.16.12 build

Author
Message
Craig Swearingen
sad Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 99, Visits: 654
I downloaded the current build 13.7.16.12 and have rebuilt my VS2010 application running under Win7. My application works well on the 11.12.14.12 version.

When I try to show my main window I get a NullReferenceException in the Nevron code during the InitializeComponent on this line in my NForm:

this.LayoutBar.Dock = System.Windows.Forms.DockStyle.Bottom;

The stack shows the null reference is in the Nevron code:


> Nevron.Presentation.dll!Nevron.UI.WinForm.Controls.NDockingToolbar.MakeDocked(bool restoreRow) + 0x90 bytes
Nevron.Presentation.dll!Nevron.UI.WinForm.Controls.NDockingToolbar.SetDockStyleInternal(System.Windows.Forms.DockStyle style) + 0x6f bytes
Nevron.Presentation.dll!Nevron.UI.WinForm.Controls.NDockingToolbar.l1ll1lII11(System.Windows.Forms.DockStyle style) + 0xc8 bytes
Nevron.Presentation.dll!Nevron.UI.WinForm.Controls.NDockingToolbar.Dock.set(System.Windows.Forms.DockStyle value) + 0xa0 bytes

In the debugger if I press F5 to continue past this I hit the same exception in the Nevron code when I try to move my layout bar during a post initialization step. Ultimately, my layout bar isn't shown in the proper location. Seems there must be something that needs changing in the MakeDocked method. I don't see how I can work around this issue.

Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)

Group: Forum Members
Last Active: 9 hours ago
Posts: 2,962, Visits: 3,363
Hello Craig,

Could you check whether in licenses.licx file have some records which leads to the old assemblies. If yes you should delete them.
Also, please check whether in InitializeComponent have some properties set from resources. If yes please, remember their values, then delete them and set them back again.
This is necessary because if some new property was added or the type or name of an old property is changed the resource won't be valid any more.

Please, let us know if the problem persist.

Best Regards,
Nevron Support Team



Craig Swearingen
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 99, Visits: 654
Thanks for the suggestion. It has not helped. I previously tried an evaluation copy in May and had no problems at all. Worked great. I don't recall needing to delete the license file entries then but I deleted all of them as you suggested today. (I did notice, however, that when I hover over the Nevron tool in the VS2010 toolbox that it continues to show the old version # in the tooltip for it. When I add a tool to a window though the license file updates with the new version #.)

Nothing on the window being loaded uses any resources. All string entries during initialization. Here's the toolbar initialization code:

//
// LayoutBar
//
this.LayoutBar.AllowDelete = false;
this.LayoutBar.AllowHide = false;
this.LayoutBar.AllowRename = false;
this.LayoutBar.AllowReset = false;
this.LayoutBar.Commands.AddRange(new Nevron.UI.WinForm.Controls.NCommand[] {
this.LBSaveLayout});
this.LayoutBar.DefaultLocation = new System.Drawing.Point(0, 0);
this.LayoutBar.Dock = System.Windows.Forms.DockStyle.Bottom;
this.LayoutBar.HasPendantCommand = false;
this.LayoutBar.Name = "LayoutBar";
this.LayoutBar.PrefferedRowIndex = 0;
this.LayoutBar.RowIndex = 0;
this.LayoutBar.Text = "Layout";
//
// LBSaveLayout
//
this.LBSaveLayout.Properties.BeginGroup = true;
this.LBSaveLayout.Properties.Style = Nevron.UI.WinForm.Controls.CommandStyle.Text;
this.LBSaveLayout.Properties.Text = "&Save Layout...";
this.LBSaveLayout.Properties.TooltipHeading = false;
this.LBSaveLayout.Properties.TooltipText = "Save this layout";
this.LBSaveLayout.Click += new Nevron.UI.WinForm.Controls.CommandEventHandler(this.LBSaveLayout_Click);



The window being created is basically a MDI window shell with a menu and 2 toolbars. That's it. One docked at the bottom which causes the exception. If I change it to dock at the top it works fine til I need to programmatically dock it elsewhere. Then the exception happens again. (My application supports layouts and I have code which remembers where the toolbars were docked as part of my layout settings. When the user changes layouts I programmatically set the .Dock property to what the layout needs for each toolbar.)

I don't see anyway to work around this.

Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)

Group: Forum Members
Last Active: 9 hours ago
Posts: 2,962, Visits: 3,363
Hello Craig,

We found what was the problem that was throwing this exception.
It should be fixed for the next build.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic