Re: [MacRuby-devel] [MacRuby] #127: implement Set using NSSet

2008-11-14 Thread MacRuby
#127: implement Set using NSSet
-+--
 Reporter:  [EMAIL PROTECTED]  |Owner:  [EMAIL PROTECTED]
 Type:  defect   |   Status:  closed 
 Priority:  blocker  |Milestone:  MacRuby 0.4
Component:  MacRuby  |   Resolution:  fixed  
 Keywords:   |  
-+--
Changes (by [EMAIL PROTECTED]):

  * status:  assigned => closed
  * resolution:  => fixed


Comment:

 Let’s call this done, in r722, r723, r738 and r741. Still some tests to
 pass, but this is pretty close. As per my discussion w/Laurent, there are
 some methods still left in set.rb, at least for now.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] KVO dot notation bug?

2008-11-14 Thread Jim Getzen
I may have come across a KVO-related bug in MacRuby. In my project I  
have an Objective-C subclass of NSObject that uses @property and  
@synthesize to set up instance variable accessors.


In the init method I set a key-value observer for one of those  
variables ('text') using:
[self addObserver:self forKeyPath:@"text"  
options:NSKeyValueObservingOptionNew context:NULL];


The class also has the required observing method:
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object  
change:(NSDictionary *)change context:(void *)context


When I set a new value for 'text' from Objective-C code using  
something like instance.text = @"Hello", the observing method is  
called as expected and everything is fine.


When I set a new value from MacRuby code using  
instance.setText("Hello"), it also works fine.


However, when I set a new value from MacRuby code using dot notation,  
e.g. instance.text = "Hello", it fails and the debugger is activated.  
The error log is lengthy, but it begins with these statements:


warning: Could not find object file "/private/tmp/trunk/array.o" - no  
debug information available for "array.c".


warning: Could not find object file "/private/tmp/trunk/bignum.o" - no  
debug information available for "bignum.c".


Assigning values to the other instance variables of the Obj-C class  
works fine from MacRuby using dot notation, but those other variables  
do not have observers assigned. In fact, if I remove the  
'observeValue...' method from the Obj-C class, the dot notation  
assignment works fine again for that 'text' variable.


Sure seems like a bug to me. Any ideas?

Jim
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #152: KVC arguments not properly marshalled

2008-11-14 Thread MacRuby
#152: KVC arguments not properly marshalled
-+--
 Reporter:  [EMAIL PROTECTED]  |Owner:  [EMAIL PROTECTED]
 Type:  defect   |   Status:  reopened 
 Priority:  blocker  |Milestone:  MacRuby 0.4  
Component:  MacRuby  |   Resolution:   
 Keywords:   |  
-+--
Changes (by [EMAIL PROTECTED]):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 Fixed key names in r743.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #152: KVC arguments not properly marshalled

2008-11-14 Thread MacRuby
#152: KVC arguments not properly marshalled
-+--
 Reporter:  [EMAIL PROTECTED]  |Owner:  [EMAIL PROTECTED]
 Type:  defect   |   Status:  closed   
 Priority:  blocker  |Milestone:  MacRuby 0.4  
Component:  MacRuby  |   Resolution:  fixed
 Keywords:   |  
-+--
Changes (by [EMAIL PROTECTED]):

  * status:  reopened => closed
  * resolution:  => fixed


Comment:

 For posterity, the final syntax is:

 {{{
 class MathFacts
   kvo_array :firstTenSquares do
 def size; 10; end
 def [](i); (i+1)*(i+1); end
   end
 end

 >> MathFacts.new.valueForKey 'firstTenSquares'
 => [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
 }}}

 and similar for kvo_set.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel