зеркало из https://github.com/mono/mail-archives.git
103 строки
3.3 KiB
HTML
103 строки
3.3 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE> [Mono-osx] [MonoMac] "Apply Protocol to Class"
|
||
|
</TITLE>
|
||
|
<LINK REL="Index" HREF="index.html" >
|
||
|
<LINK REL="made" HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20%5BMonoMac%5D%20%22Apply%20Protocol%20to%20Class%22&In-Reply-To=AANLkTinSeTPpukbut8oiSRBZUXBcQL56%2B21LAQyEBjgz%40mail.gmail.com">
|
||
|
<META NAME="robots" CONTENT="index,nofollow">
|
||
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||
|
<LINK REL="Previous" HREF="003748.html">
|
||
|
<LINK REL="Next" HREF="003761.html">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#ffffff">
|
||
|
<H1>[Mono-osx] [MonoMac] "Apply Protocol to Class"</H1>
|
||
|
<B>Miguel de Icaza</B>
|
||
|
<A HREF="mailto:mono-osx%40lists.ximian.com?Subject=%5BMono-osx%5D%20%5BMonoMac%5D%20%22Apply%20Protocol%20to%20Class%22&In-Reply-To=AANLkTinSeTPpukbut8oiSRBZUXBcQL56%2B21LAQyEBjgz%40mail.gmail.com"
|
||
|
TITLE="[Mono-osx] [MonoMac] "Apply Protocol to Class"">miguel at novell.com
|
||
|
</A><BR>
|
||
|
<I>Fri Jan 21 10:55:13 EST 2011</I>
|
||
|
<P><UL>
|
||
|
<LI>Previous message: <A HREF="003748.html">[Mono-osx] [MonoMac] "Apply Protocol to Class"
|
||
|
</A></li>
|
||
|
<LI>Next message: <A HREF="003761.html">[Mono-osx] [MonoMac] "Apply Protocol to Class"
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#3759">[ date ]</a>
|
||
|
<a href="thread.html#3759">[ thread ]</a>
|
||
|
<a href="subject.html#3759">[ subject ]</a>
|
||
|
<a href="author.html#3759">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<!--beginarticle-->
|
||
|
<PRE>Hello,
|
||
|
|
||
|
><i> I ran into a usage pattern that seems common.  In Interface Builder define
|
||
|
</I>><i> an NSTableView and an NSArrayController.  Set the NSArrayController as the
|
||
|
</I>><i> outlet for the NSTableView's dataSource and delegate.  Then specify the
|
||
|
</I>><i> NSArrayController to be a custom class.
|
||
|
</I>
|
||
|
So I was looking into this, and the recommended use case for the
|
||
|
NSArrayController is not to set it as the delegate/data source as you
|
||
|
described, but instead to use Bindings (KVO/KVC) to hook up the data,
|
||
|
and this would require no intervention on your end for this, nor
|
||
|
implementing the protocols like that.
|
||
|
|
||
|
<A HREF="http://www.cocoadev.com/index.pl?NSArrayController">http://www.cocoadev.com/index.pl?NSArrayController</A>
|
||
|
|
||
|
And:
|
||
|
|
||
|
<A HREF="http://www.cocoabuilder.com/archive/cocoa/196362-beyond-mv-and-one.html#196372">http://www.cocoabuilder.com/archive/cocoa/196362-beyond-mv-and-one.html#196372</A>
|
||
|
|
||
|
Miguel
|
||
|
</PRE>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<!--endarticle-->
|
||
|
<HR>
|
||
|
<P><UL>
|
||
|
<!--threads-->
|
||
|
<LI>Previous message: <A HREF="003748.html">[Mono-osx] [MonoMac] "Apply Protocol to Class"
|
||
|
</A></li>
|
||
|
<LI>Next message: <A HREF="003761.html">[Mono-osx] [MonoMac] "Apply Protocol to Class"
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#3759">[ date ]</a>
|
||
|
<a href="thread.html#3759">[ thread ]</a>
|
||
|
<a href="subject.html#3759">[ subject ]</a>
|
||
|
<a href="author.html#3759">[ 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>
|