#152: KVC arguments not properly marshalled
-+--
Reporter: [EMAIL PROTECTED] |Owner: [EMAIL PROTECTED]
Type: defect | Status: closed
Priority: blocker |Milestone:
#127: implement Set using NSSet
-+--
Reporter: [EMAIL PROTECTED] |Owner: [EMAIL PROTECTED]
Type: defect | Status: assigned
Priority: blocker |Milestone:
#152: KVC arguments not properly marshalled
-+--
Reporter: [EMAIL PROTECTED] |Owner: [EMAIL PROTECTED]
Type: defect | Status: closed
Priority: blocker |Milestone:
Hi,
I've been working on rewriting the preferences code of LimeChat
and have now extracted it for use in other projects.
I thought it might be interesting for HotCocoa as well.
See the readme and tests for an idea of the usage:
http://github.com/alloy/rubycocoa-prefs/tree/master
Currently it's
We had arrays, now let's have sets, too. Refactored out the base
redefinition code to make the set case easy to add.
---
lib/hotcocoa/kvo_accessors.rb | 39 ++
+
1 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/lib/hotcocoa/kvo_accessors.r
These changes let you write methods for KVO accessing using natural
Ruby syntax:
class T
kvo_array :squares do
def size
10
end
def [](i)
i * i
end
end
end
>> T.new.valueForKey('squares')
=> [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
---
lib/hotcocoa.rb |1 +
lib/hot