Re: [MacRuby-devel] programatic binding (undefined bind method on NSTextField) SOLVED

2011-09-28 Thread Matt Aimonetti
Thanks for the update. - Matt Sent from my iPhone On Sep 28, 2011, at 4:54, Alex Greif wrote: > In the macirb I forgot to import 'Cocoa'. ANd in my App it seems that I > had a typo. > > it now works now. > > Thanks > > >> I even tried it on lion with the latest nightly build, and even ther

Re: [MacRuby-devel] programatic binding (undefined bind method on NSTextField) SOLVED

2011-09-28 Thread Alex Greif
In the macirb I forgot to import 'Cocoa'. ANd in my App it seems that I had a typo. it now works now. Thanks > I even tried it on lion with the latest nightly build, and even there I > get "false" for the respond_to? > > Do I have to install something else beside macruby? > Or Why is the protoc

Re: [MacRuby-devel] programatic binding (undefined bind method on NSTextField)

2011-09-28 Thread Alex Greif
I even tried it on lion with the latest nightly build, and even there I get "false" for the respond_to? Do I have to install something else beside macruby? Or Why is the protocol not automatically added to the NSObject class? Thanks, Alex. > Have you got the right signature? Looking at > > http:

Re: [MacRuby-devel] programatic binding (undefined bind method on NSTextField)

2011-09-28 Thread Alex Greif
I am on 10.6.8 I tried with the 0.10 and the nightly build from 2011.9.27 and with both versions I get a "false" for the following statements in the macruby irb I have installed Xcode 3.2.4 Any Ideas why this does not work? - 0.10 - $ macirb irb(main):001:0> NSObject.alloc.i

Re: [MacRuby-devel] programatic binding (undefined bind method on NSTextField)

2011-09-27 Thread Sven A. Schmidt
Have you got the right signature? Looking at http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Protocols/NSKeyValueBindingCreation_Protocol/Reference/Reference.html I see only bind:toObject:withKeyPath:options: and on Lion with macruby_nightly-2011-09-23 I

Re: [MacRuby-devel] programatic binding (undefined bind method on NSTextField)

2011-09-27 Thread Alex Greif
The following code prints false twice So it seems that the protocol is not applied correctly. Is this a bug or do I need some other require/framework statements? BTW the result is the same if i use "framework 'Cocoa'" code - framework 'AppKit' puts NSObject.alloc.init.conform

Re: [MacRuby-devel] programatic binding (undefined bind method on NSTextField)

2011-09-27 Thread Alex Greif
The first line of my code is framework 'AppKit' IMO this should import it. BTW I am using Macruby 0.10 > `bind:toObject:withKeyPath` is actually from the > `NSKeyValueBindingCreation` category on NSObject which is defined in the > Appkit. If it seems to disappear then I would think it is a prob

Re: [MacRuby-devel] programatic binding (undefined bind method on NSTextField)

2011-09-27 Thread Shannon Love
`bind:toObject:withKeyPath` is actually from the `NSKeyValueBindingCreation` category on NSObject which is defined in the Appkit. If it seems to disappear then I would think it is a problem importing `AppKit.framework` somewhere. On Sep 27, 2011, at 3:22 PM, Alex Greif wrote: > I want to bind

[MacRuby-devel] programatic binding (undefined bind method on NSTextField)

2011-09-27 Thread Alex Greif
I want to bind my NSTextField to my model object. In objective-c I would do something like [mytextfield bind:@"value" toObject:myperson withKeyPath:@"address" options:nil]; But I have problems doing this in MacRuby with the following snippet: mytextfield = NSTextField.alloc.initWithFrame [20, 200