Re: [MacRuby-devel] NSObject.to_s question

2010-05-07 Thread Laurent Sansonetti
Hi Jordan, Yes please file a bug report, this looks like a nice enhancement. Thanks, Laurent On May 5, 2010, at 1:30 PM, Jordan Breeding wrote: > 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 NS

Re: [MacRuby-devel] NSObject.to_s question

2010-05-05 Thread Jordan Breeding
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_w

Re: [MacRuby-devel] NSObject.to_s question

2010-05-05 Thread B. Ohr
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“ woul