Reply to comment

Running away from Mono

I may have spoken too soon in that last post. It turned out there are a few very problematic bugs in the WinForms library that are keeping my application from running properly. While I realize that converting everything over to GTK# would probably solve my problems, the proposition is not one I am at present willing to undertake. Thus it seems I am back to developing solely for Windows on the whole. I do have plans to try porting the application to Java at some point though. Apache's HttpClient class looks rather promising and I theorize that the AOT compilers available for Java will essentially make Java what I had hope Mono would be: a way of deploying an application to multiple platforms from a single code base.

I ran into two bugs that doomed my project. The first was the one which freezes your program if a delegate launched from an event handler tries to call MessageBox.Show(). Once I figured out that I just had to put the delegate in a new thread to keep things moving, it seemed I was back in business.

Since I was doing this all as part of a login form which was supposed to return to a larger form after execution, I had the larger form calling ShowDialog on the login form. Turned out that calling this.Hide() on my login form from the thread mentioned above closed the form as expected but failed to return control to the parent form. Thus my program was essentially frozen. This caused me some consternation, but I figured I could just have the login form construct and call the main form instead of the other way around. Sadly I neglected to realize that creating a form from a thread would cause the form in the thread to be disposed of after the thread finished execution. That was the last straw for me. It's not so much that these bugs are insurmountable: given time I could easily work around these foibles. The problem is that I don't know how much else about WinForms is broken. Plus I looked on the bug tracker and saw a few bugs that were over a year old, which didn't exactly inspire confidence in me. While I suppose this is an open source project and I could in theory fix it myself, I simply don't have the time to do so. I want something reliable that works like I expect it to. Thus I find myself pushed towards Java for my cross-platform needs.

I'll keep you posted on my trials and travails.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options