Re: [FYI] CommViewer plugin
Posted: Fri Dec 26, 2014 5:14 pm
Hi Joe,
That's a good change. You never want to be doing XPLMFindDataRef() on a frequent basis. A good pattern to follow is the deferred startup pattern, where you register a flightloopcallback to happen, say, every ten frames. That way, when your callback fires for the first time, you can guarantee that the sim has fully loaded all plugins. That's a good place to do the XPLMFindDatarefs, then you can unregister your deferred callback function.
That's a good change. You never want to be doing XPLMFindDataRef() on a frequent basis. A good pattern to follow is the deferred startup pattern, where you register a flightloopcallback to happen, say, every ten frames. That way, when your callback fires for the first time, you can guarantee that the sim has fully loaded all plugins. That's a good place to do the XPLMFindDatarefs, then you can unregister your deferred callback function.