Tuesday, February 22, 2011

Something Old, Something New

The chunky 4GL math library creates console applications with very little GUI grace. The solution to the quagmire came in the form of .NET wrapper around the console application. All the niceties of a modern GUI with the number crunching under the hood.

Being that the 4GL is strictly single threaded, a few tricks were needed in order to accommodate the inter process communication. Since the wrapper had no way to directly initial a dialog, the 4GL had to instigate the handshake.

Initially I established a channel using a network socket, low level stuff.  I found it more responsive and robust to cheat a little.  I set off a system file watcher thread from the .NET wrapper and created event handlers for the various types of files it discovered.

No comments:

Post a Comment