Projects

Ticket #649 (closed defect: fixed)

Opened 23 months ago

Last modified 22 months ago

NSNumber bridging problem

Reported by: eloy.de.enige@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.6
Component: MacRuby Keywords:
Cc:

Description

There seems to be an issue with NSNumber bridging on the current trunk. Here I have NSArrayController's selection index bound to a Ruby class which takes a selectionIndex:

can't convert NSCFNumber to Integer (NSCFNumber#to_int gives NSCFNumber) (TypeError)

I think it boils down to this:

Incorrect behavior on trunk:

irb(main):001:0> NSNumber.numberWithInt(42).class
=> NSCFNumber

Correct behavior on older version:

irb(main):001:0> NSNumber.numberWithInt(42).class
=> Fixnum

Change History

Changed 22 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.6

I believe you fixed this problem by yourself :-)

Note: See TracTickets for help on using tickets.