[macruby-changes] [782] MacRuby/trunk/objc.m

source_changes at macosforge.org source_changes at macosforge.org
Thu Jan 8 02:18:44 PST 2009


Revision: 782
          http://trac.macosforge.org/projects/ruby/changeset/782
Author:   eloy.de.enige at gmail.com
Date:     2009-01-08 02:18:44 -0800 (Thu, 08 Jan 2009)
Log Message:
-----------
Added documentation to rb_objc_define_kvo_setter.

Modified Paths:
--------------
    MacRuby/trunk/objc.m

Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m	2009-01-07 15:13:25 UTC (rev 781)
+++ MacRuby/trunk/objc.m	2009-01-08 10:18:44 UTC (rev 782)
@@ -3124,6 +3124,16 @@
     return NULL; /* we explicitely return NULL because otherwise a special constant may stay on the stack and be returned to Objective-C, and do some very nasty crap, especially if called via -[performSelector:]. */
 }
 
+/*
+  Defines an attribute writer method which conforms to Key-Value Coding.
+  (See http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/KeyValueCoding.html)
+  
+    attr_accessor :foo
+  
+  Will create the normal accessor methods, plus <tt>setFoo</tt>
+  
+  TODO: Does not handle the case were the user might override #foo=
+*/
 void
 rb_objc_define_kvo_setter(VALUE klass, ID mid)
 {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090108/83b3b971/attachment.html>


More information about the macruby-changes mailing list