mail-archives/mono-osx/2009-February/002063.html

135 строки
4.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-osx] 3 cross-platform questions
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%203%20cross-platform%20questions&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="002062.html">
<LINK REL="Next" HREF="002064.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-osx] 3 cross-platform questions</H1>
<B>Mac Programmer</B>
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%203%20cross-platform%20questions&In-Reply-To="
TITLE="[Mono-osx] 3 cross-platform questions">MacPgmr at fastermac.net
</A><BR>
<I>Tue Feb 24 19:58:07 EST 2009</I>
<P><UL>
<LI>Previous message: <A HREF="002062.html">[Mono-osx] Delphi Prism and all those Cocoa bridges
</A></li>
<LI>Next message: <A HREF="002064.html">[Mono-osx] 3 cross-platform questions
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#2063">[ date ]</a>
<a href="thread.html#2063">[ thread ]</a>
<a href="subject.html#2063">[ subject ]</a>
<a href="author.html#2063">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>I've been enlivened by the recent discussions of Cocoa, Prism, etc.
so much so that I've now officially dipped my toe into the Mono
waters. Here are some questions that I can't answer myself at this
point.
(1) How does one create a true cross-platform custom control, meaning
a control that functions both with WinForms and Cocoa? It appears as
though in the .Net world most custom controls are UserControl
descendants, which would apparently mean that the custom control is
WinForms-only. Is there some other way? The custom control I have in
mind is in a nice fat 1.5MB assembly far to big to consider rewriting
from scratch and it's a UserControl descendant. It works perfectly on
Mac with Mono, although the resulting WinForms app it's used in is
ugly. On most days of the week I'll go ugly rather than nothing, but
is there any other way?
For example, is there some way to drop a Cocoa-simulated UserControl
below the custom control or would you have to simulate the entire
WinForms?
(2) Is there a way to create a Cocoa app in Mono without using
a .nib? I've been able to get it down basically to an empty .nib,
without a main window or main menu, and then create the main window
and its controls and event handlers in code, but it seems as though
some kind of application controller class that's linked to a
minimal .nib is required. I've only done this with Prism and Cocoa#
so far, but it should work with C# and the other Cocoa wrappers too.
I find that creating the UI in code is more satisfying at this point
than working with IB, which strikes me as sub-RAD. This also
eliminates the need for [Export] and [Connect] attributes (meaning
the application controller class is starting to resemble a WinForms
Form class).
(3) Is it possible to mix and match the GUI's? For example a
System.Windows.Forms.Form with a Cocoa main menu. WinForms on the Mac
is apparently implemented using the Carbon framework, which should co-
exist okay with the Cocoa framework, but maybe WinForms itself won't
co-exist with anything else.
I appreciate the challenges of cross-platform GUI development, but
the suggested solution (VM, VS, IB, etc.) sounds like a 12-step
program designed to wean frustrated Mac developers from their Macs.
Thanks.
-Phil
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="002062.html">[Mono-osx] Delphi Prism and all those Cocoa bridges
</A></li>
<LI>Next message: <A HREF="002064.html">[Mono-osx] 3 cross-platform questions
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#2063">[ date ]</a>
<a href="thread.html#2063">[ thread ]</a>
<a href="subject.html#2063">[ subject ]</a>
<a href="author.html#2063">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-osx">More information about the Mono-osx
mailing list</a><br>
</body></html>