Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Paul,

I'm trying to use the DLL airport facilities from another class and am running into an error.

The connection to FSUIPC happens in my main form class. I'm also loading the airport database from that class.

I have another class that needs to be able to query the info in the airport database. If I try to access the FSUIPCConnection.AirportDatabase features from the other class, I get the following exception:

An unhandled exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
The given key was not present in the dictionary.

I get this exception as well if I try to load the database from the other class, rather than loading it in the form class.

I am able to use other dll functions from my other class such as processing offsets, querying fuel tanks, etc. It's just the airport database that has me stuck.

Any thoughts?

 

 


 

 

Posted

Hi Jason,

It sounds like you are trying to use the AirportDatabase before the connection to FSUIPC is open. It's not a good exception as it doesn't tell you what the real problem is. I'll correct this in the next release.

Paul

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.