Revision: 782 http://trac.macosforge.org/projects/ruby/changeset/782 Author: eloy.de.enige@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/Key...) + + 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) {