Re: [MacRuby-devel] NSManagedObject being returned in delegate as Pointer

2008-12-30 Thread Dr Nic Williams
At least I know to look out for (void *) and pass objects around outside them. Thx for the help. On Wed, Dec 31, 2008 at 2:08 PM, Laurent Sansonetti wrote: > Oh I see, indeed. The problem here is that the contextInfo argument has a > "void *" type, so the runtime does not know that you passed an

Re: [MacRuby-devel] NSManagedObject being returned in delegate as Pointer

2008-12-30 Thread Laurent Sansonetti
Oh I see, indeed. The problem here is that the contextInfo argument has a "void *" type, so the runtime does not know that you passed an Objective-C object for it via an implicit cast. In this case, we need to introduce a new method on Pointer to allow you to change its type. In RubyCocoa,

Re: [MacRuby-devel] NSManagedObject being returned in delegate as Pointer

2008-12-30 Thread Nic Williams
Calling recipe[0] results in this error: AppDelegate.rb:157:in `[]': can't convert C/Objective-C value `0x8004676a0' of type `v' to Ruby object (ArgumentError) I'm not sure what this means. I've played around with the Pointer class and I can get this error a lot. The original ObjC signature that

Re: [MacRuby-devel] NSManagedObject being returned in delegate as Pointer

2008-12-30 Thread Laurent Sansonetti
On Dec 30, 2008, at 7:32 PM, Nic Williams wrote: In this code sample: http://gist.github.com/41855 I am getting a Pointer instance instead of an NSManagedObject_Recipe instance (from Core Data). Subsequently the setValue:forKey: call at the end of the delegate/callback method fails. The top met

[MacRuby-devel] NSManagedObject being returned in delegate as Pointer

2008-12-30 Thread Nic Williams
In this code sample: http://gist.github.com/41855 I am getting a Pointer instance instead of an NSManagedObject_Recipe instance (from Core Data). Subsequently the setValue:forKey: call at the end of the delegate/callback method fails. The top method addImage(sender) launches an NSOpenPanel, which

[MacRuby-devel] [MacRuby] #193: exec() does not work on MacRuby

2008-12-30 Thread MacRuby
#193: exec() does not work on MacRuby +--- Reporter: vincent.isamb...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blocker

Re: [MacRuby-devel] Mocha

2008-12-30 Thread Eloy Duran
Yup, you're right. Although trying to coerce it into a String is not necessary since this really is what you get on MR, so I updated the test to check for that instead of String: http://github.com/alloy/mocha/commit/f8c72b0f139714498488ff38534fc68e56f47430 From some of the others I have distil

Re: [MacRuby-devel] Mocha

2008-12-30 Thread Nic Williams
I think some of the tests might need macruby-proofing: 3) Failure: test_should_describe_matcher(InstanceOfTest) [/Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha/test/unit/parameter_matchers/instance_of_test.rb:22]: <"instance_of(String)"> expected but was <"instance_of(NSMutableString)">. perhap

[MacRuby-devel] Mocha

2008-12-30 Thread Eloy Duran
Hi (Laurent), I have been busy making mocha work on MR, which somewhat works now: http://github.com/alloy/mocha/commits/macruby But there are quite some other interesting failures with the mocha tests, which might be interesting to look into. Cheers, Eloy % macrake test:units (in /Users/e