| | | StrataFrame User
       
Group: Forum Members Last Login: 05/25/2007 3:34:57 PM Posts: 235, Visits: 309 |
| I created a new SF Windows App, added a few controls and bo's and hit run and got a complaint about:
private static void InitApplication(InitializingApplicationEventArgs e)
{
//-- Add the main form type
//-- If more than one form is added to the collection, they can be chosen by showing a "Gateway" form
// and supplying the index of the form to show (At least 1 form type must be added to the collection
e.Forms.Add(typeof(MainForm.ResultSetBuilder));
//-- ToDo: Add any extra application initialization
MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML;
MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage("ResultSetBuilder", "", false); ;
}
The project is named ResultSetBuilder and the form is named MainForm.
I don't understand why the code generator put this:
MainForm.ResultSetBuilder
in the e.Forms.Add
Removing the .ResultSetBuilder obviously resolves the runtime error. |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 08/01/2008 8:53:41 AM Posts: 2,671, Visits: 1,879 |
| | I'm not sure exactly what happened either... when you add a new SF winforms app, the template for that line of code looks like this: e.Forms.Add(typeof($safeprojectname$.Form1)); So, the project name (which is the default namespace) would be put first, and then the text "Form1" would be put. Since "Form1" is not anywhere to be seen in the code that you posted, I can only assume that the line was modified by hand after the project was created, or that the C# refactor tool failed to properly rename the form from Form1 to MainForm.
www.bungie.net |
| | | | StrataFrame User
       
Group: Forum Members Last Login: 05/25/2007 3:34:57 PM Posts: 235, Visits: 309 |
| I'll try again. Probably just a fluke.
Thanks. |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 08/01/2008 8:53:41 AM Posts: 2,671, Visits: 1,879 |
| Yes, I've seen the C# refactor do some strange things... it only guarantees that the renaming will complete successfully if the project can successfully build and has been built recently.
www.bungie.net |
| |
|
|