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. Image for the cookie policy date
close icon

DockingManager exception in Dispose of MDI client window

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

9 Replies

JC Jay Cincotta March 8, 2004 06:23 PM UTC

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


AD Administrator Syncfusion Team March 8, 2004 10:18 PM UTC

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.


JC Jay Cincotta March 9, 2004 02:58 AM UTC

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


AD Administrator Syncfusion Team March 9, 2004 12:17 PM UTC

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.


AD Administrator Syncfusion Team March 9, 2004 01:59 PM UTC

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.


SY Syl May 18, 2004 04:05 AM UTC

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


AD Administrator Syncfusion Team May 18, 2004 07:54 PM UTC

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.


SY Syl May 23, 2004 11:07 AM UTC

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


AD Administrator Syncfusion Team May 25, 2004 01:13 AM UTC

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.

Loader.
Live Chat Icon For mobile
Up arrow icon