From: harry <hv...@ch...> - 2004-05-27 06:41:23
|
On 27-mei-04, at 5:46, rub...@li... wrote: > > Today's Topics: > > 1. Cocoa Bindings support? (harry) > 2. Re: Cocoa Bindings support? (Chris Thomas) > > --__--__-- > > Message: 1 > To: rub...@li... > From: harry <hv...@ch...> > Date: Wed, 26 May 2004 22:08:53 +0200 > Subject: [Rubycocoa-talk] Cocoa Bindings support? > Reply-To: rub...@li... > > > Hi all, > recently I started experimenting with the new Controller layer in [...] > --__--__-- > > Message: 2 > From: Chris Thomas <cj...@cj...> > Subject: Re: [Rubycocoa-talk] Cocoa Bindings support? > Date: Wed, 26 May 2004 13:45:49 -0700 > To: rub...@li... > Reply-To: rub...@li... > > > --Apple-Mail-41--77032666 > Content-Transfer-Encoding: 7bit > Content-Type: text/plain; > charset=US-ASCII; > format=flowed > > If you build RubyCocoa yourself, it will contain support for all of the > new Panther Cocoa classes. The build process scans the Cocoa headers to > generate the Ruby interfaces. > > Chris I did build RubyCocoa myself, because at the time the binary install didn't work; I had to remove some deprecated constants from framework/src/objc/cocoa/rb_NSGraphics.m and rb_NSSavePanel.m in order to get it build. After that, it works fine, untill I tried my hands on Cocoa Bindings, new in Panther. My dummy-app is the demo-project found at: http://www.macdevcenter.com/pub/a/mac/2004/04/06/cocoa.html?page=1 I decided to do it with ruby and then the Book-class will be: def Book < OSX::NSObject attr_accessor :title attr_accessor :author end All fine, untill I try to run the app from Xcode, which shows this error: /Users/hvs/tmp/bibliotecha/build/bibliotecha.app/Contents/Resources/ rb_main.rb:19:in `NSApplicationMain': NSApplicationMain - NSUnknownKeyException - [<Book 0x4f2540> valueForUndefinedKey:]: this class is not key value coding-compliant for the key title. (OSX::OCException) from /Users/hvs/tmp/bibliotecha/build/bibliotecha.app/Contents/Resources/ rb_main.rb:19 Am I missing something? Harry |