зеркало из https://github.com/mono/mail-archives.git
104 строки
3.8 KiB
HTML
104 строки
3.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-osx] Working with delegates
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Working%20with%20delegates&In-Reply-To=AANLkTi%3DFDkHF2p_3Dz7bwzi5MTLp7BaC%3D4MXWvXtG2XR%40mail.gmail.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="003418.html">
|
|
<LINK REL="Next" HREF="003425.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-osx] Working with delegates</H1>
|
|
<B>Florian Heiber</B>
|
|
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20Working%20with%20delegates&In-Reply-To=AANLkTi%3DFDkHF2p_3Dz7bwzi5MTLp7BaC%3D4MXWvXtG2XR%40mail.gmail.com"
|
|
TITLE="[Mono-osx] Working with delegates">fh at rtfnt.com
|
|
</A><BR>
|
|
<I>Tue Nov 30 11:08:03 EST 2010</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="003418.html">[Mono-osx] Working with delegates
|
|
</A></li>
|
|
<LI>Next message: <A HREF="003425.html">[Mono-osx] Working with delegates
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#3421">[ date ]</a>
|
|
<a href="thread.html#3421">[ thread ]</a>
|
|
<a href="subject.html#3421">[ subject ]</a>
|
|
<a href="author.html#3421">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Thanks for your hints. So this is basically the way you choose when it comes to implementing NSTableView data sources as well, right?
|
|
|
|
Just for the background: Is there nothing like the concept of protocols on the .NET-side?
|
|
|
|
–f
|
|
|
|
On 30.11.2010, at 16:40, Miguel de Icaza wrote:
|
|
|
|
><i>
|
|
</I>><i> I know two possibilities: use object of separate class which will
|
|
</I>><i> inherit from NSWindowDelegate, overriding specific methods; or mark
|
|
</I>><i> [Export("windowShouldClose:...")] methods in your controller class.
|
|
</I>><i>
|
|
</I>><i> There may be other ways, though.
|
|
</I>><i>
|
|
</I>><i> That pretty much covers it.
|
|
</I>><i>
|
|
</I>><i> To recap, if you want to go strongly typed, you have two options: (a) inherit from NSWindowDelegate and override methods or (b) Use C# events exposed on the NSWindow class.
|
|
</I>><i>
|
|
</I>><i> If you do not mind going loosely typed, then all you have to do is create any class that derives from NSObject and decorate the methods with [Export] very much like we do in the source code for MonoMac itself.
|
|
</I>><i>
|
|
</I>><i> Miguel
|
|
</I>><i> _______________________________________________
|
|
</I>><i> Mono-osx mailing list
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">Mono-osx at lists.ximian.com</A>
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/mono-osx">http://lists.ximian.com/mailman/listinfo/mono-osx</A>
|
|
</I>
|
|
-------------- next part --------------
|
|
An HTML attachment was scrubbed...
|
|
URL: <A HREF="http://lists.ximian.com/pipermail/mono-osx/attachments/20101130/9980a501/attachment.html">http://lists.ximian.com/pipermail/mono-osx/attachments/20101130/9980a501/attachment.html</A>
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="003418.html">[Mono-osx] Working with delegates
|
|
</A></li>
|
|
<LI>Next message: <A HREF="003425.html">[Mono-osx] Working with delegates
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#3421">[ date ]</a>
|
|
<a href="thread.html#3421">[ thread ]</a>
|
|
<a href="subject.html#3421">[ subject ]</a>
|
|
<a href="author.html#3421">[ 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>
|