StrataFrame Forum

Error Creating New Business Object

http://forum.strataframe.net/Topic13178.aspx

By Bill Cunnien - 12/27/2007

All I did was click OK after naming the new business object and I received this error (white screen of death):

The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: SalesOrderStatusesBO --- The base class 'System.Object' cannot be designed.

Weird, huh?

Bill

By Bill Cunnien - 1/22/2008

Another instance of the WSOD:

The designer loader did not provide a root component but has not indicated why.

What is up with that?  This has been happening with a good bit of frequency lately. 

Should I be alarmed?

Closing the designer and reopening it brings everything back, but there must be a root cause somewhere for this behavior.

Thanks,
Bill

By Ivan George Borges - 1/22/2008

Hey Bill.

I bet Trent will know a deeper reason for this problem, but I don't. Just to let you know that I get those all the time, and it is always a "get out and back again" kind of solution. I just live with it.

By Trent L. Taylor - 1/22/2008

Weird, huh?

Actually, no.  I know that at first some of these errors and messages do not make a lot of sense, but it all comes down to the assemblies being loaded into the AppDomain of the development environment.

As you have already noticed, you cannot see the strong-typed field names of a BO until the project has been built.  This is because the type editors (builders) must be able to create an instance of that object in order to reflect it (reflection).  So when this object is created, it must first load it's assembly which is loaded into the current AppDomain.  WHen you make a change, and this type of object is in use or there is another assembly on disk with the old name, then you can start seeing this type of behavior.  This is why when you get out of Visual Studio and come back in some of these problems go away...the AppDomain is cleared and reloaded from the new assembly.

The designer loader did not provide a root component but has not indicated why.

This message can from from a number of different places, but this is an example of when you could see this.  When a type editor is invoked, many times the root component is referenced which gives a reference of the BO (or root component being modified) which is called through the IDesignerHost interface.  Bottom line is that when you start renaming or making some changes like this, you are going to run into some of this type of behavior....so this is actually normal Smile

This message can also appear when the form is being loaded through the InitializeComponent method when designing the form.  There is no direct answer, but it generally comes from making a change to a class that either removes functionality or it can no longer reference the type.  Hope this helps...I know that it wasn't a very straight answer Smile

By Bill Cunnien - 1/22/2008

An excellent, straight answer...thanks!!  BigGrin
By Trent L. Taylor - 1/23/2008

Good...I am glad it made sense Smile