[MacRuby-devel] Crash with NSUInteger in delegate method
Łukasz Adamczak
lukasz at czak.pl
Fri May 22 01:58:32 PDT 2009
> an NSNumber object should do it.
Laurent, thanks for the answer. I believed that was the case.
What about the delegate method case, though? I mean, the framework I'm
playing with expects a certain delegate method and passes C unsigned
ints to it:
http://github.com/lukhnos/objectiveflickr/blob/b480aa39fa0e96f40a1b44523e0b6f918b2ed441/Source/ObjectiveFlickr.m#L525
In this case I have no say in the Objective-C side of things. I write
only Ruby code. The only thing I can do is to not implement the method
at all (and lose some functionality provided by the framework).
Obviously in an open-source environment I'm free to patch the library
to my liking, but that's not optimal and not always possible.
There may be more cases like this. Unless there is a policy on not
using primitive types in delegates (is there?), more libraries (or
maybe Cocoa itself?) can have problems with MacRuby.
--
Regards,
Łukasz Adamczak
More information about the MacRuby-devel
mailing list