StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Wierdness in new SF Windows AppExpand / Collapse
Author
Message
Posted 08/21/2006 5:29:40 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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.
Post #2345
Posted 08/22/2006 9:23:16 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 09/26/2008 8:30:36 AM
Posts: 2,685, Visits: 1,886
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
Post #2354
Posted 08/22/2006 7:50:49 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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.
Post #2387
Posted 08/23/2006 8:54:47 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 09/26/2008 8:30:36 AM
Posts: 2,685, Visits: 1,886
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
Post #2395
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:49am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 8 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.