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.
Syncfusion Feedback

3.2 and RegisterMdiChildTypes in BarManager

Thread ID:

Created:

Updated:

Platform:

Replies:

29042 May 16,2005 12:51 AM UTC May 16,2005 06:19 PM UTC Windows Forms 1
loading
Tags: Tools
Sue Harris
Asked On May 16, 2005 12:51 AM UTC

One of the things I noticed in my upgrade to 3.2 was that I was suddenly getting strange crashes when opening several of my MDI forms. What causes it, is that when a MDI child form is opened, it calls RegisterMdiChildTypes on the BarManager with a copy of the form created via reflection using the default constructor (presumably in previous versions it either wasn''t calling the function, or used the instance of the form that was being added rather than creating a new one via reflection). So a warning to you all - if you don''t have a default constructor for your MDI child form (I didn''t always) or you get a NullReferenceException on a variable in your Dispose or base class constructor code for a variable which you *know* you set in your form - this may be why. Unfortunately the function which allows you to provide an instance of the class to register is private, so there doesn''t appear to be any other way that to have a safe default constructor which can be used to create the class via reflection, and to test all your variables in the constructor/disposal functions before using them. Regards, Sue

Administrator [Syncfusion]
Replied On May 16, 2005 06:19 PM UTC

Hi Sue, Your analysis of the situation looks correct to me. The inclusion of a default constructor is recommended for use with XPMenus regardless of the version of Tools. Regards, Gregory Austin 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.

Warning Icon 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.Close Icon

;