[MacRuby-devel] obj.method(m) often gives a TypeError
Laurent Sansonetti
lsansonetti at apple.com
Wed Jan 5 23:47:35 PST 2011
Hi Tim,
Try loading the Foundation framework first.
framework 'Foundation'
Laurent
On Jan 5, 2011, at 12:49 AM, Tim Rand wrote:
> I noticed that obj.method(m) is often giving an error. The error given on [].methods looks like:
>
> Tim:~/Desktop> macirb
> >> def err(obj)
> >> obj.methods(1,1).each do |m|
> ?> begin
> ?> obj.method(m)
> >> rescue => e
> >> p e
> >> end
> >> end
> >> end
> => nil
> >> err([])
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `?'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `{_NSRange=QQ}'>
> #<TypeError: unrecognized runtime type `?'>
>
> No errors are raised with the same code (without parameters on the methods of course) in ruby 1.9.1.
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110105/dfeddc6c/attachment.html>
More information about the MacRuby-devel
mailing list