From: Allison N. <dem...@ma...> - 2008-04-11 11:42:48
|
*blink* *blink* *embarassed blush* Oh crap!, I really should have seen that :-) Thanks for the help. On Friday, April 11, 2008, at 01:27PM, "Eloy Duran" <e....@su...> wrote: >Hi Alli, > >It works fine for me: > > >> class BarCell < NSCell > >> def initTextCell(str) > >> puts 'here' > >> super_initTextCell(str) > >> end > >> end >=> nil > >> BarCell.alloc.initTextCell('foo') >here >=> #<BarCell:0x363df0 class='BarCell' id=0x581390> > >> BarCell.initTextCell('foo') >OSX::OCMessageSendException: Can't get Objective-C method signature >for selector 'initTextCell:' of receiver BarCell > from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ >oc_wrapper.rb:50:in `ocm_send' > from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/ >oc_wrapper.rb:50:in `method_missing' > from (irb):10 > > >It looks like you are sending the initTextCell: message to the class >BarCell instead of to an instance. >So you should first send it the alloc message to get back an instance >and then send it the initTextCell: message > >Cheers, >Eloy > |