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."

12 of 378 comments (clear)

  1. 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 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
    2. 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.

    3. 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.

  2. 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.

  3. 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.

  4. 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...
  5. 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.

  6. 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."
  7. 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.

  8. 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.

  9. 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.