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
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
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:
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
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
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
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
`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
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