Wierdness in new SF Windows App


Author
Message
Daniel Essin
Daniel Essin
StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)
Group: Forum Members
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 Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.

Daniel Essin
Daniel Essin
StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)
Group: Forum Members
Posts: 235, Visits: 309
I'll try again. Probably just a fluke.

Thanks.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search