• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

New home for me!

Messages
66
Country
us-massachusetts
Thanks to Nick and Arno for creating this site - a much needed home for coders who make FS addons. I can already tell I will be here often!

Please let me know if I can contribute in some way and help the cause.

Best,
sg

PS> Next build of FS-Blaze is nearly out the door! My first app for FS but not the last!
 
Welcome! We are all delighted to see skilled developers coming here.

Contribute what you can... even if you think others will already know it!
 
Hi Scott and welcome over here! In my experience the more i find out the more i realize how little I really know

By the way did you solve the localization problem on FS-Blaze?
 
Yes - I ended up using the System.Globalization.CultureInfo.InvariantCulture method and just kept everything in the format on the NOAA website. Not the most elegant, but certainly effective.

The problem I'm currently working through in FS-Blaze is related to Application.Restart - I check my ini file for a build id string. If an old version is detected, the ini is deleted and rebuilt. However, when I call application.restart(), I get three instances of the application respawning - one with the old settings, one with absolutely NO settings, and a third with the new defaults. Everything exits inelegantly at that point (unhandled exceptions)...very odd.

Not critical though. I'll get it done...
 
Hmmm weird - what are you trying to do?
 
damm ini :)

I had a simillar problem and was only to solve it with the use of Configuration.ConfigurationManager

Something like

this.Inform.ForeColor = Color.FromName(ConfigurationManager.AppSettings["ButtonTextColor"]);

However had to add te system.configuration in to the references otherwise it assumed the 1.1 assembly :confused:

José
 
I have been adding so many entries in the .ini file with the newer builds (poor design plan :) ), I put in a routine to detect an old initialization file. I already had a routine that would detect the lack of an ini file (new install) at startup and create a default, so I thought it would work to simply delete the old invalid ini, and restart the application. However, there's a weird interaction with the try/catch block, closing the file stream, and Application.Restart. Somewhere along the way, an unhandled exception (or more) gets thrown (I suspect restart tries to flush the file stream which has already been released?), and several new threads spawn.

Not a problem, I'm reworking the logic, but if there's an opportunity to learn something here, please teach! I'm a novice, learning as I go - I really hope this will be a good place to grow my skill set and actually create some cool utilities as we go.

Thanks!
sg
 
So, let me see if I understand this - you are using an ini file, different versions can have different ini files so if you find the wrong one you correct it and call the program to restart?

I've had this a bunch of times as I am not good at thinking ahead either :eek: but I never forced the program to re-start - just cleaned up the ini in the load phase and then processed it, but I guess I haven't gotten the problem right in my head yet...

What sort of ini file are you using and how are you handling it? I know that the purists will shout at me but I still use the old MS ini file and invoke calls to the API to read and write it. The more modern way is to use an XML file for application data, and VS2005 provides it's own settings functionality - though I never got that to work properly and hence I am stuck in the stone age when it comes to ini files :)
 
I've gotten XML to work well - I use that in FS-Blaze for compiling the fire scenery. We should talk about that if you need it.

My ini is just a simple text file. Nothing elaborate. I should have used the registry, but I already knew how to do that, I wanted more practice creating and using data files of my own formatting. An exercise really.

The logic you describe is how I'm approaching it now. Check for old version, delete old, create new with defaults, continue...
 
Hi Scott - let us know how it goes...........
 
Back
Top