[MacRuby-devel] NSObject.to_s question
Jordan Breeding
jordan.breeding at me.com
Wed May 5 18:15:43 PDT 2010
Yeah, I was doing something similar right now, just hoping for a better long term solution in MacRuby.
On May 05, 2010, at 20:11, B. Ohr wrote:
> Jordan,
>
> you can do something like that:
>
> class Object
> alias :old_inspect :inspect
>
> def inspect
> i = old_inspect
> if i.start_with?('#<')
> d = description
> d.start_with?('<') ? i : d
> else
> i
> end
> end
> end
>
> But you’re right, a better integration of „description“ would be nice.
>
> Bernd
>
>
> Am 05.05.2010 um 22:30 schrieb Jordan Breeding:
>
>> Right now for custom objects on the Objective-C side even if you provide a -[Object description] call to_s will fall through and hit to_s from NSObject which right now just has the class name and pointer.
>>
>> Is it already planned for the future to use the description method in to_s on the MacRuby side? Should I file a bug report?
>>
>> Jordan_______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3842 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100505/180149c7/attachment.bin>
More information about the MacRuby-devel
mailing list