[MacRuby-devel] programatic binding (undefined bind method on NSTextField)
Sven A. Schmidt
sas at abstracture.de
Tue Sep 27 23:58:57 PDT 2011
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 get:
irb(main):014:0> NSObject.alloc.init.respond_to?('bind:toObject:withKeyPath:options:')
=> true
irb(main):015:0> NSTextField.alloc.initWithFrame([1,2,3,4]).respond_to?('bind:toObject:withKeyPath:options:')
=> true
Cheers,
Sven
> 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.conformsToProtocol
> Protocol.protocolWithName('NSKeyValueBindingCreation')
>
> puts NSTextField.alloc.initWithFrame([1,2,3,4]).conformsToProtocol
> Protocol.protocolWithName('NSKeyValueBindingCreation')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3770 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110928/6e13a3de/attachment-0001.bin>
More information about the MacRuby-devel
mailing list