Laurent Sansonetti
lsans****@apple*****
Mon Jun 18 11:31:47 JST 2007
I added #clone that does the same thing as #dup (committed as r1841). Thanks for the report, and keep up the good work with the MiniKidsGames (I love them) :-) Laurent On Jun 14, 2007, at 7:25 PM, Tatsuhiro Nishioka wrote: > Hi Laurent, > > Excellent! > > Either #dup or NSPoint.new(point1.x, point1.y) works for me so it's > OK to me. > At this point, I'm going to use the latter, and will use #dup after > the next RubyCocoa release. > > Well, now it's my turn to improve MiniKidsGames and FlightGear Mac > OS X. > Speaking of which, If any of you gets interested, take a look at: > http://minikidsgames.sourceforge.net/ > http://macflightgear.sourceforge.net/ > > These are fun to play, and are of course powered by great RubyCocoa. > > Anyway, thanks for your help! > I think I should have a bag printed "No RubyCocoa, No Life" :-) > > > Tat > > On Jun 15, 2007, at 10:40 AM, Laurent Sansonetti wrote: > >> Hi Tatsuhiro-san, >> >> Recently in SVN I introduced the #dup method which should do what >> you want. >> >> I wasn't aware of #clone but apparently it does the same thing than >> #dup. We may alias our #dup to #clone too. >> >> Laurent >> >> On 6/14/07, Tatsuhiro Nishioka <tat****@ics*****> wrote: >>> Hi folks, >>> >>> I've been working on adapting MiniKidsGames/FlightGear Mac OS X to >>> RubyCocoa-0.11.1 (was working on 0.5.0) >>> It seems that almost everything works perfectly after eliminating >>> deprecated stuff. >>> However, there's a tiny problem that I want to share with you guys. >>> >>> Here is the simple code that causes the exception "Given structure >>> 0x4b83fc has null data." on 0.11.1 >>> >>> point1 = NSPoint.new(10, 20); >>> point2 = point1.clone >>> >>> if (point2.y < 100) # This doesn't raise exception >>> point2.y += 10 # Exception occurs here, in this case point2 is >>> 0x4b83fc >>> end >>> >>> I think it's a bit weird since referring to point2.y is OK but >>> assigning value is not. >>> >>> This means that it's better not use a clone of NSPoint (or any >>> instance of NSObject?) >>> Plus, this code works on RubyCocoa-0.5.0. (I only tested this on >>> 0.5.0 and 0.11.1) >>> Does any of you knows what causes this? Or using clone for NSObject >>> is no good at all? >>> >>> Anyways, your effort and progress on RubyCocoa is wonderful. >>> I really appreciate your doing this for many ruby/cocoa users. >>> >>> Thanks >>> >>> p.s. >>> How was the WWDC, Hisa-san? >>> I really like the message on your bag so I'd like to know that. >>> >>> Tat >>> >>> ------------------------------------------- >>> Tatsuhiro Nishioka >>> >>> Institute for Software Research, >>> University of California, Irvine >>> email: tat****@ics***** >>> voice: 944-824-2703 >>> ------------------------------------------- >>> >>> _______________________________________________ >>> Rubycocoa-devel mailing list >>> Rubyc****@lists***** >>> http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel >>> >> >> _______________________________________________ >> Rubycocoa-devel mailing list >> Rubyc****@lists***** >> http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel > > ------------------------------------------- > Tatsuhiro Nishioka > > Institute for Software Research, > University of California, Irvine > email: tat****@ics***** > voice: 944-824-2703 > ------------------------------------------- > > _______________________________________________ > Rubycocoa-devel mailing list > Rubyc****@lists***** > http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel