Slashdot Mirror


Mono's Cocoa# Underway, GTK# Takes on Windows.Forms

Gentu writes "OSNews posted some exclusive screenshots of a new project in the Mono community: Cocoa#. Apparently there are a couple of Apple engineers helping out the project that allows developers to create graphical Cocoa applications under Mac OS X using the C#, Python or Basic language. Mono seems to be doing well in the Windows land too, allowing developers to use GTK# instead of Windows.Forms to create multi-platform apps."

37 of 378 comments (clear)

  1. Yikes! by Anonymous Coward · · Score: 5, Funny

    I got a headache just reading the headline. Give us old fogies a break, we're used to seeing the hash mark at the beginning of the line...

  2. Windows.Forms in Mono by miguel · · Score: 5, Informative

    I wanted to mention that our path to indepedence
    clearly goes through Gtk#, but we realize the
    importance of giving users binary compatibility
    so we are actively developing Windows.Forms and
    Visual Basic.NET (gasp) for Mono.

    A new from scratch implementation has started with
    four of the top Mono developers that are now
    locked up in Provo Utah working around the clock
    to delivery the new implementation of Windows.Forms
    (our previous Wine-based approach having too many
    Mono/Wine problems to solve).

    Miguel.

    1. Re:Windows.Forms in Mono by prockcore · · Score: 4, Interesting

      A new from scratch implementation has started with four of the top Mono developers that are now
      locked up in Provo Utah working around the clock
      to delivery the new implementation of Windows.Forms


      What are they doing then? I thought using wine was going to solve the p/invoke issue. Are you just going to ignore the p/invoke and just implement the exposed API?

    2. Re:Windows.Forms in Mono by Matt+-+Duke+'05 · · Score: 4, Informative

      Perhaps actually trying to accomplish what you claim is impossible might help you out a bit. This took me about 30 seconds to do:

      using System;
      using System.Drawing;
      using System.Windows.Forms;

      namespace TreeTest {
      public class TreeTest : Form {
      [STAThread]
      public static int Main(string[] args) {
      Application.Run(new TreeTest());
      return 0;
      }

      public TreeTest() {
      tree = new Tree();
      tree.Dock = DockStyle.Fill;
      Controls.Add(tree);
      Text = "TreeTest";
      }

      private Tree tree;
      }

      public class Tree : TreeView {
      public Tree() {
      menuItem = new MenuItem("Menu Item");
      contextMenu = new ContextMenu();
      contextMenu.MenuItems.Add(menuItem);
      }

      protected override void OnKeyDown(KeyEventArgs e) {
      base.OnKeyDown(e);

      if (e.KeyCode == Keys.Apps) {
      ShowMenu(new Point(0, 0));
      }
      }

      protected override void OnMouseUp(MouseEventArgs e) {
      base.OnMouseUp(e);

      if (e.Button != MouseButtons.Right) {
      return;
      }

      ShowMenu(new Point(e.X, e.Y));
      }

      protected void ShowMenu(Point pos) {
      contextMenu.Show(this, pos);
      }

      protected ContextMenu contextMenu;
      protected MenuItem menuItem;
      }
      }

      --
      -Matt
      Duke '05
    3. Re:Windows.Forms in Mono by ambrosine10 · · Score: 5, Insightful

      Those people criticizing Miguel really need to shut up. Here is a man who has contributed much code to open-source projects, is a great leader in the movement, and works for what he believes in. Yet these zealots are constantly yelling at him just because he happens to see MS technology in an impartial light. Just because it's by MS doesn't automatically make it bad. In fact if it wasn't for people like Miguel who try to merge practicality with idealism, the open-source movement would be as irrevelant as ever.

    4. Re:Windows.Forms in Mono by KAMiKAZOW · · Score: 4, Interesting
      our path to indepedence clearly goes through Gtk#


      Why GTK#? Honestly, GTK is probably one of the worst toolkit for real cross platform development.
      The Windows port of GTK sucks. This WiMP thing (Or whatever it's called - it makes GTK app to some degree look like native Windows apps) is not that great. The performance of the GTK(WIMP) apps' GUI is noticeable lower than a native GUI.

      Under Mac OS X it's even worse. GTK only works under X11. This means no Aqua look & feel. No copy and paste or drag'n'drop between native OSX apps and GTK apps. Even keyboard shortcuts are different.

      Why didn't you chose something like wxWidgets? At least wxWidgets offers native GUIs under any platforms it runs. wxWidgets or any other toolkit that offers real platform independence.
      Or: With all these XML GUIs under .NET (like XAML) Ximian could've used Mozilla's XUL toolkit and have better multi platform integration than GTK.

      Also - from what I've read on the mailing list archives - Mono only works sometimes on BSD systems.

      What kind of independence is this? You are only focused on x86-Linux running GNOME.

      Ximian does not seem really interested in real platform CocoaSharp. Stuff like Qt# (for KDE users), CocoaSharp, and other cross platform develpment is not done by any Ximian guy, but from contributors.
    5. Re:Windows.Forms in Mono by IamTheRealMike · · Score: 4, Informative
      It was, but there were communications issues. So now they're going to not only try to implement the entirely of S.W.F in C# (that's an entire widget toolkit!) but also a fake WndProc/Handle property for apps that rely on the underlying Win32ness of it.

      For *really* hard core apps (read: most .NET apps) that actually mix native and .NET code, they were talking about having a special "winelib" mode where it's somehow used, but I've not seen any credible technical details on this.

      Basically it looks like in order to run .NET code that is mixed with native Win32 code the Wine team will have to do their own S.W.F implementation one day. Currently there are no killer .NET apps that I know of (by killer I mean public/retail software sufficiently unique that it's a "blocks my migration to Linux" app, rather than custom corp apps) so it's not a big deal. But I expect they'll come eventually.

    6. Re:Windows.Forms in Mono by rhysweatherley · · Score: 4, Informative
      wtf? where is the windows.forms implementation under Linux? They are writing it from scratch because the previous version was using Wine and didnt work properly, so now they are doing it 'natively'.

      Microsoft hasnt written a windows.forms implementation under Linux - they are not playing 'catch up', they are implementing something that doesnt yet exist.

      Actually, it does. DotGNU Portable.NET has had a native implementation of SWF for over a year now. We discarded Wine as a viable option from day one.

      DotGNU Web Site.

    7. Re:Windows.Forms in Mono by IamTheRealMike · · Score: 4, Insightful
      First of all, there is no magic bullet to write quality desktop software and have it run anywhere. These days, if you want to write a program once and have it feel native on each platform, you need to be either using native widgets on each platform, or to have a big investment in custom code and tweaks in your toolkit for each platform.

      GTK# runs on multiple platforms. Unsurprisingly it works best on the platform most people use it on. It does not run well on Windows or MacOS X, but that's simply because few people have worked on it/been interested in it. That can be fixed, with time.

      When Miguel said "GTK# is the path to independence" he was talking about API independence not platform independence. They are different.

      wxWidgets does not give platform independence. Sorry, but it just doesn't cut it for quality software. Abstractions work best when the things they abstract are semantically very similar (or identical) - widget toolkits are not similar, they often work in very different ways and have radically different capabilities. I've yet to run a wxWidgets app which didn't feel piss poor on every platform : much like Swing apps not feeling native everywhere, wxWidgets apps never fit in. This doesn't cut it for writing good software for the free desktop.

      Or: With all these XML GUIs under .NET (like XAML) Ximian could've used Mozilla's XUL toolkit and have better multi platform integration than GTK.

      GTK is a proven platform used by many, many applications. XUL is really only used by the Mozilla suite of apps: it lacks such basic things as the still theoretically xulrunner. That's why it was chosen.

      Also - from what I've read on the mailing list archives - Mono only works sometimes on BSD systems. What kind of independence is this? You are only focused on x86-Linux running GNOME.

      So what? Wine doesn't work on BSD systems currently either, but this is the fault of BSD not Wine (and I believe the same is true of Mono). Both Wine and Mono do very complex things with threading, address space management and low level OS calls that BSD either doesn't support or nobody with the relevant expertise has shown up to write the support. The vast majority of people use Linux, so this gets the best support. This is the open source meritocracy : write the code and the support will come, yes?

  3. What exactly are you looking for? by junkymailbox · · Score: 4, Funny

    You know there are panther and aqua themes out there that look and behave quite similarly to the mac theme. find them at Themes at freshmeat

    1. Re:What exactly are you looking for? by theantix · · Score: 4, Insightful

      uh, dude.

      An interface is *so* much more than widgets and icons.

      And I'm a Gnome zealot, for crying out loud.

      dude.

      --
      501 Not Implemented
  4. Patents? by Anonymous Coward · · Score: 5, Informative

    From the mono FAQ:

    Question 131: Could patents be used to completely disable Mono (either submarine patents filed now, or changes made by Microsoft specifically to create patent problems)?

    ... The controversial elements are the ASP.NET, ADO.NET and Windows.Forms subsets. Those are convenient for people who need full compatibility with the Windows platform, but are not required for the open source Mono platform, nor integration with today's Mono's rich support of Linux.

  5. Mono vs. Java (again) by fupeg · · Score: 5, Interesting

    There are some decent arguments for using Mono over Java on Linux. Those arguments don't hold up as well on OSX, though. Java support on the Mac is in many ways superior to Java on any other platform, especially for Swing apps (the counterpart to most Cocoa# apps.) Still it could be attractice to have a framework that made it as easy as Java is for developing cross-platform (Windows/Linux/OSX) apps that would have significant performance advantages over Java on 2 out of 3 of those platforms.

  6. wxWidgets, another _perfect_ alternative with Mono by after · · Score: 4, Informative

    I've been using wxWidgets for some corperate develpment and I don't think I can be more happy with it. Integrating Cocoa into Mono is nice with GTK and all (didn't read article- sorry,) but is it going to use native UI faculties that the operating system provides? wxWidgets even has .NET interpolabilito under development called wx.NET and you can use that with Mono too.

  7. Apple could really benefit... by callipygian-showsyst · · Score: 4, Interesting

    ..from embracing (and extending!) C# and .NET. Programmers generally like C# and .NET for application development, and Objective-C has some serious flaws.

    1. Re:Apple could really benefit... by jcr · · Score: 4, Insightful

      Objective-C has some serious flaws. ..and also some compelling advantages. Take a look at how NSUndoManager was implemented, and please tell me how to do the same thing in Java, C#, C++ or whatever your favorite language may be.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
  8. Mono has come very far in a short period of time by Ars-Fartsica · · Score: 4, Insightful
    Congrats to the Mono crew - from announcement to 1.0, they have covered a lot of ground in a short period of time and if they are perceived to be encumbered by patent issues (note I say perceived), they are not encumbered by bad-source-practices that is still keeping Java locked out of some domains.

    You can use real apps right now with Gtk# - the Muine music player and the Blam RSS reader are functional and mostly stable...there are many other examples.

  9. Re:For Linux? by Amiga+Lover · · Score: 4, Insightful

    I want Mac OS's interface on Linux! I've done what I consider to be as good of a job as I can, but it's not the best knock-off in the world.

    They should be concentrating on making quick & efficient UIs like the Amiga had, or the early Macs, not bloat upon bloat upon bloat.

    Both the original mac and Amiga UI systems fit inside 512k RAM or less, leaving everything else for the App's functionality. When some of those early machines were expanded from 68000 CPUs to 68040s and 32MB of ram or more they flew faster than any 2 or 3GHz cpu in GUI feel. Nothing could outclass them

    So why do we need this bloat?

  10. Gtk# Rocks by pherthyl · · Score: 5, Interesting

    Even back in the 0.8 days, I had very few problems making a medium sized app (~4000 lines), developed entirely under linux with Mono. Everything worked on the first try when I ran it on windows with .NET.

    Now that's true cross platform ability. Even with Java I've never had it work that flawlessly. Thanks Miguel and Mike Kerster and the rest of the Mono team. You guys rock.

  11. Question about GTK# by EvanED · · Score: 4, Interesting

    I've been looking high and low for a cross platform GUI tool, and the only one I particularily like is Qt. Which, of course, you have to pay lots of money for to get the Windows version (or deal with the "freeware" bit stuck in the title bars of windows). I'm gonna look into Wx.NET; just found out about that in this discussion.

    Anyway, I'm reading over the FAQ for GTK#, and it says you need to have cygwin. So, my question is, does only the developer of the software need to have cygwin, and then it builds it using libraries provided with it and outputs a nice standalone application, or does everyone who wants to use it need to install cygwin? I can't seem to figure this out from the site...

    1. Re:Question about GTK# by DAldredge · · Score: 5, Informative

      That is only to build the software, you do not need to have Cygwin installed to run GTK# apps.

  12. Re:For Linux? by jcr · · Score: 4, Funny

    I want Mac OS's interface on Linux!

    Request denied.

    -jcr

    --
    The only title of honor that a tyrant can grant is "Enemy of the State."
  13. Re:I think the world has finally left me behind by Osty · · Score: 5, Insightful

    Why the obsession with Microsoft technology?

    .NET is pretty damned good, and people recognize that. The few who don't are the normal "Anything but Microsoft" zealots. It's not perfect, but very good and getting better.


    What's it going to give me, an embedded systems developer?

    Absolutely nothing, but you're not the target demographic.


    Why are vice presidents at work mandating its use in a hard realtime product?

    .NET is the hot new buzzword, and your VPs aren't smart enough to realize that it's not suitable for embedded realtime applications.


    Frankly it appears to me that the world has gone stark raving mad.

    From your perspective, that may be true, but then you're looking at the world from the eyes of a real-time, embedded systems developer where you work with a limited set of known hardware under strict time and resource constraints. .NET isn't for you. That doesn't mean the world has actually gone mad, just that there's more to the world than that which applies to you.


  14. Re:you have got to be joking by The+Infamous+Grimace · · Score: 4, Insightful

    Yeah, I used to use a MS Intellipoint Optical Wheelmouse with my 2 macs, still use it on one. However, for my old laptop I've gone back to the ol' one-button. Why? I've decided that the original paradigm is better; the keyboard has far more functionality than any mouse, with the exception of the scroll wheel.

    In Safari, if you want to open a link in another tab, just command-click. In another window? Alt-command-click. Want a menu? Ctrl-click.

    For dealing with files, open 2 finder windows in column view, and stack them on the screen. Want to cut-n-paste? Drag-n-drop. Want to copy? Alt drag-n-drop. Want a shortcut? Alt-command drag-n-drop.

    The more I use a one-button mouse, the more I like it. YMMV.

    (tig)

    --
    Ignorance and prejudice and fear
    Walk hand in hand
  15. Re:I think the world has finally left me behind by Anonymous Coward · · Score: 5, Insightful

    Think about it this way.

    For years, developers targetting the windows platform had two (real) choices VB or C/C++.

    With C/C++ you had two choices. Use the win32 API directly and/or use MFC. With VB, creation of GUI apps was made as simple as possible, at the expense of a cumbersome language.

    Throw COM into the mix, complex threading models and API interface du-jour and the bottom line is that Windows developers have been guinea pigs feeding on inconsistent standards for 15 years.

    -----Enter Java

    Finally, a language that brings OOP to the masses without having to learn complex semantics regarding memory allocation. It also eliminates the cumbersome and overly complex nature of STL in C++.

    The drawbacks were twofold: Early java adopters didn't have the rich GUI IDE's present in VB5/6 and VC++/DevStudio. Like it or not, it hurt producitivty, at least in the short term. Translation: corporate america didn't warm up to the idea immediately.

    Another drawback to java was the rampant verbosity of the language. There are those that do believe that enum's and value types are GOOD things.

    Then you had the immaturity of Java GUI toolkits that made 'rich client' apps look like they were written by high school script kiddies.

    ---- Enter .NET/C#

    Goodbye VB6. Goodbye VC++. Hello managed code. Goodbye MFC. Hello (working) garbage collection. Goodbye complex threading models. Hello full-featured clone of Java.* renamed as System.*.

    C# as a language is a dream. It contains most of the language features that I had been dying for. It is readable, quick to code in and is put together in a consistent manner.

    There is very little about C# that is better than java. But for windows-based shops, Java can't hold a candle to c#/.net.

    It isn't a religous war. You may not like microsoft's policies or busines practices. And they certainly didn't invent the concept of a managed environment or one-up Java.

    While the typical slashdotter is foaming at the mouth about MS, .NET and how we are all bunch of idiots, I am busy writing code for a good company that just happens to base their operations on windows.

    Imagine the ability to take an ASP.NET app that you RAD-developed using MS VS.NET tools and cross-compiling it in Mono, running the whole thing under apache using mod_mono.

    You would have the benefit of a killer IDE (VS.NET), a rock-solid back end (Apache) and an application framework that works without headache!

    That is why **I** use MS.NET and MONO. I don't particularly care for MS, but I am smart enough to know what side of the bread is buttered.

    Bottom line: Sometimes you have to get past the religious zealotry of the pro-linux/anti-ms crowd (ie. slashdot) and see something for it's good.

    This isn't a perfect world, and MS usually sucks, but .NET is cool. Linux is cool. Mono is cool.

    Lets marry them together and reap the benefits.

    Standing at the back of room pouting isn't helping advance your cause.

  16. Re:you have got to be joking by azav · · Score: 4, Informative

    The reason behind the 1 button mouse was that it was painfully clear what the 1 button was to be used for. If you wanted "right button style functionality," hold down the option key and click.

    Studies done at the time indicated that people made more mistakes with multi button mice and mice with multi button interfaces took longer for the user to accomplish what they want to do (because of the mistakes and confusion about what the other button was for).

    For me, it is pretty damn obvious that the mouse button is used to provide the "primary operations" for the item clicked on. Holding down the option key when clicking to extend into "options" for the item makes perfect sense to me.

    What really is the big deal with people's obsession on multi button mice? Honestly, I don't get it.

    --
    - Zav - Imagine a Beowulf cluster of insensitive clods...
  17. native GUIs with C# on Windows, Linux, OS X by dekeji · · Score: 4, Interesting

    There is another choice for native GUIs using C# on Windows, Linux, and OS X: wx.NET, bindings of the wxWindows library to Mono and Microsoft's .NET implementation.

    wxWindows is great because it gives you a uniform API across different platforms and toolkits, while at the same time using native widgets and giving you access to platform-specific features if you like.

  18. Re:Miguel, please leave this planet! by OmegaBlac · · Score: 5, Insightful

    What is it with the hatred for this man? I swear some you act like he is the anti-christ for what he is attempting to accomplish with the Mono project.

    1. No one is forcing anyone to use Mono or run .Net apps on other operating systems.

    2. Try to look at the advantages that the OSS and Linux communities can utilize here if we can convince more developers to develop apps for Linux due to the existance of Mono.

    3. Mono and Miguel are not going anywhere so all the folks in the anti-mono crowd might as well get use to it.

  19. Re:I think the world has finally left me behind by dekeji · · Score: 4, Interesting

    The key differences between C# and Java are philosophy and licenses.

    Java's philosophy is built around WORA and enforced standardization, courtesy of Sun Microsystems.

    C# is just a language, like C or C++--it comes with a small standard library, but what you do with it beyond that is up to you. C# has a language standard, and an open one at that, but the degree to which you follow that is up to you.

    Whether that is good or bad is a matter of needs and preferences. I think the level of enthusiasm C# and Mono have generated should tell you which way the wind is blowing.

    Note that Mono is not just about cloning Microsoft. Mono is building an entire platform; part of that platform is Microsoft compatibility libraries, but most of it is actually based on open source APIs and libraries.

  20. Re:Cocoa on top of Mono? by jcr · · Score: 4, Informative

    The number of people still using the original root class, Object, is vanishingly small. GNUStep has a perfectly good implementation of NSObject, which tracks the Apple implementation quite well.

    -jcr

    --
    The only title of honor that a tyrant can grant is "Enemy of the State."
  21. Also: Mono Project 1.0.1 Released by DAldredge · · Score: 5, Informative

    http://www.mono-project.com/downloads/

    Mono 1.0.1 has been released and fixes a number of bugs.

  22. Slow? by TheInternet · · Score: 4, Interesting
    "it's S-L-O-W"

    Is this based on anything? It's slower than raw C or assembly of course, but quite fast overall.

    Everything below this sentence is from http://www.alastairs-place.net/cocoa/faq.txt:

    * 2.7 How fast are Objective-C messages?

    The name "message" might make you think that they are slow; however, they are
    actually quite fast. Here are some figures from a 1GHz PowerPC G4 (courtesy
    of Marcel Weiher):
    Operation | Time (ns)

    Increment (memory) variable | 2
    Call through an IMP | 12
    Local function call | 18
    Cross-module function call | 37
    Objective-C message | 54
    atoi("1") | 182
    Local function call refers to a call to a function in the same executable or
    dynamic object module. Cross-module function call is a call from one
    executable or dynamic object module into another.

    On current Apple versions of GCC, an Objective-C message results in a call to
    objc_msgSend(), which is itself a cross-module function call. That means that
    the actual method dispatch only takes 17ns (on average), which is pretty
    quick.
    --
    Scott Stevenson
    Tree House Ideas
  23. Re:I think the world has finally left me behind by groomed · · Score: 4, Insightful
    Well, as the anonymous poster above already mentioned, you need to consider what came out of Microsoft before .NET; a confused jumble of acronyms and paradigms with the combined lifespan of a Coke bottle.

    .NET really is Microsoft's first serious contribution to the computing culture (as opposed to industry) at large. It synthesises many of the ideas of the past decade in a very clean and logical way. And it's remarkably open: not in the sense that it's endorsed by some standards body, but in the sense that it actually makes an effort to integrate with other technologies -- through the pervasive use of XML, the Common Language Runtime and the numerous hooks in the class library, all the way down to the fact that the C# compiler will actually not explode when encountering a file with \n line termination rather than \r\n.

    .NET is a heavy-duty framework that will be around in some form for decades to come, and it's pretty good. It's like Java but less insular, it's like C but less tedious.

    What generates all the hubbub, of course, is that something like this is coming from Microsoft. Think of it as a celebration party. What's being celebrated is that Microsoft is finally coming of age.

  24. Re:I think the world has finally left me behind by Osty · · Score: 5, Insightful

    I understand that this is a rather novel concept under Windows, and if I were a Windows application developer I might just go along with it. It's certainly less painful than MFC/COM+. But that doesn't explain the massive exodus away from traditional languages and frameworks by Unix developers.

    All I can offer is that C# and .NET are the current "cool" things, and thus Unix (read: Linux) developers don't want to be left out in the cold. That may change in the future. It may not. Mono may mature to the point where cross-platform .NET applications Just Work (tm) without ugly GTK# stuff (GTK# is fine for Linux, but GTK on Windows sucks, and I can't imagine GTK# would be any better -- besides, the look & feel is all off, and themes can only do so much to correct that).


    Okay, imagine I also write end user applications for Linux/Unix users. What does Mono give me that C++/Qt/KDE does not? What does it give me that non-Ximian C/GTK/GNOME does not? What does it give me that RubyQT and wxPython do not?

    Basically, ask yourself why you would use Java rather than C/C++/Qt/KDE/GTK/GNOME or a scripting language like Ruby or Python, and then realize that C# fixes many annoyances from Java (int is both Object-derived and a value type in C#, unlike int vs. Integer in Java; You can create user-defined value types in C#; C#'s generics implementation is much more robust than Java's syntactical sugar hack that translates everything to Object during compilation; etc) and adds new language features (attributes, properties, events, etc). Java and C# are garbage-collected, which makes them more secure by default than C/C++ (with respect to memory management issues, anyway -- you can certainly still write insecure code in Java or C#). They're also compiled to an intermediate language, so they're faster than scripting languages (yes, Python and Ruby have various different compilers to build C code, java bytecode, .NET IL code, etc, but in their vanilla forms they're interpreted scripting languages).


    Or to put it another way, why should I jump on the .NET bandwagon when Java is here today and Parrot is just around the corner?

    .NET fixes a number of shortcomings of Java. Also, the C# language and common runtime are truly open (ECMA standardization), unlike Java. Parrot has been "just around the corner" for years, and nothing I've seen has indicated that it will actually "come around the corner" any time soon. If you want to wait, or build your software on top of ever-changing beta code, go ahead and use Parrot.

  25. Re:Guide for newbies by OmegaBlac · · Score: 4, Informative

    You can look through the ECMA document for a Hello World example. Also check out last months Ars Technica Linux.Ars article on Mono as it provides a couple of examples too.

  26. GTK# is NOT ready by ralinx · · Score: 5, Interesting

    i'm developing a C# application which has a System.Windows.Forms (SWF) frontend for the Windows version, and a GTK# frontend for the Linux version. I was hoping to get rid of the SWF frontend and deploy my application on Windows and Linux using the GTK# frontend. Despite all of the hype surrounding Mono/GTK# (thanks miguel) i have not been able to get this working because GTK# simply doesn't work correctly with MS.NET. There are parts of GTK# that actually rely on an incompatibilty between Mono and MS.NET to work correctly. So when this code is executed with MS.NET, you'll get runtime exceptions. The same code will function correctly on Windows when you use Mono on Windows, but then i get memory leaks everytime i use Regex.Match which my application needs quite often. So after leaking about 395MB of RAM, the garbage collector will crash with an error ("too many heap sections"). The same code runs perfectly on Linux in Mono.

    I would really like to see Mono and GTK# completely ready to be used on Windows for _serious_ stuff (as in: not the average Hello World GTK# app) but rigth now, it just isn't up to the task yet. On Linux, it's pretty good alraedy, but on Windows it's just unusable for my application. I've had to go back to using my old SWF frontend for my windows users.

  27. Re:answer by bnenning · · Score: 4, Informative

    C# and Java provide "reflection" APIs for implementing things like this. It would be quite easy to create a class entirely analagous to NSUndoManager in either language

    No it wouldn't. Check the documentation; NSUndoManager intercepts *any* message sent to it, and stores it for later invocation on a different target. You can't do that with reflection, which only allows you to call one of a fixed number of methods.

    Another example: there are third party libraries that add higher order messaging to Cocoa collection classes. They allow you to write code like "[[array select] isFroody]", which will return all objects in array for which the method -isFroody returns true. Again, the initial "isFroody" message is intercepted, then forwarded to each object in the array.

    --
    How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.