We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

DockingManager exception in Dispose of MDI client window

Thread ID:

Created:

Updated:

Platform:

Replies:

11485 Mar 8,2004 01:21 PM May 24,2004 09:13 PM Windows Forms 9
loading
Tags: Tools
Jay Cincotta
Asked On March 8, 2004 01:21 PM

I notice that in my tabbed MDI application I get an exception in the Dispose method for docking manager if (and only if) I close the client window before doing anything with it. There error is: Object reference not set to an instance of an object. Stack Trace: at Syncfusion.Windows.Forms.Tools.DockingManager.set_DHCInFocus(DockHostController value) ... I notice that I do not get this exception if I interact with any of the controls on the window. Even changing focus within the form will avoid the exception. I also notice that I don''t see this problem on other MDI child forms, so it''s clear that there''s something "special" about this form that''s causing trouble. To reproduce the error, load the attached solution into VS 2003. Run the ZaphodGUI3 program. Select File-->New-->AnalysisForm. Then click the close box (X) in the child form. Thanks, Jay Cincotta

Jay Cincotta
Replied On March 8, 2004 01:23 PM

oops, forgot the attachment... >I notice that in my tabbed MDI application I get an exception in the Dispose method for docking manager if (and only if) I close the client window before doing anything with it. > >There error is: > >Object reference not set to an instance of an object. > >Stack Trace: >at Syncfusion.Windows.Forms.Tools.DockingManager.set_DHCInFocus(DockHostController value) > >... > >I notice that I do not get this exception if I interact with any of the controls on the window. Even changing focus within the form will avoid the exception. > >I also notice that I don''t see this problem on other MDI child forms, so it''s clear that there''s something "special" about this form that''s causing trouble. > >To reproduce the error, load the attached solution into VS 2003. Run the ZaphodGUI3 program. Select File-->New-->AnalysisForm. Then click the close box (X) in the child form. > >Thanks, >Jay Cincotta > MDIPrototype_7185.zip MDIPrototype_5849.zip

Administrator [Syncfusion]
Replied On March 8, 2004 05:18 PM

Hi Jay, Thanks for your feedback on this isue and also for the attached samples. However, I was unable to run the samples here and got the following error message (refer screenshot). Could please correct this error and resend the sample ? We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.

Jay Cincotta
Replied On March 8, 2004 09:58 PM

Hi Guru, I believe all you need to do to run the solution is right-click on the ZaphodGUI3 project and choose to the option "Set as Startup Project". Thanks, Jay

Administrator [Syncfusion]
Replied On March 9, 2004 07:17 AM

Hi Jay, Thanks for the update. I could observe mentioned problem here. This is not reproducable in a sample application, and hence it looks like an usage issue in your application. I will further investigate this code, and update you as soon as possible. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On March 9, 2004 08:59 AM

Hi Jay, In the AnalysisForm, please handle the Form''s Closing event as shown in the code below : private void AnalysisForm_Closing(object sender, System.ComponentModel.CancelEventArgs e) { IEnumerator ienum = this.dockingManager1.Controls; ArrayList dockedctrls = new ArrayList(); while(ienum.MoveNext()) dockedctrls.Add(ienum.Current); foreach(Control ctrl in dockedctrls) { this.dockingManager1.SetEnableDocking(ctrl, false); ctrl.Dispose(); } this.dockingManager1.Dispose(); } Before closing the form, make sure that all the docked controls, and the DockingManager have to be disposed off correctly. The application runs fine when this is done. Please refer to the modified_sample here. Let me know if this works for you. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Syl
Replied On May 18, 2004 12:05 AM

Hi Jay & Guru! In the You still have a problem, when you close your mdi child Experiment form with the contextMenu > Close option. I have the same problem How to correct that? thks! syl

Administrator [Syncfusion]
Replied On May 18, 2004 03:54 PM

Hi Syl, Thanks for bringing this to our attention. I could observe the above mentioned crash here. I will further investigate this code to see if there is a workaround/solution. We appreciate your patience, and thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Syl
Replied On May 23, 2004 07:07 AM

hello What about your investigations? Have you found a workaround? Regards Syl

Administrator [Syncfusion]
Replied On May 24, 2004 09:13 PM

Hi Syl, Could you please open a DirectTrac incident in this regard ? I will update you there with more information. In future, please address all your concerns through DirectTrac as far as possible. We appreciate your cooperation on this issue. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;