From: Jonathan P. <jp...@dc...> - 2005-09-06 07:43:36
|
On 6 Sep 2005, at 6:55, Steven Arnold wrote: > In the irb session below I require/include needed libraries and > then attempt to use the NSIndexSet class. This worked under PyObjC > but does not seem to work under RubyCocoa. The docs suggest that > NSIndexSet should respond to indexSetWithIndex:. Any ideas what's > going on? Is this a bug? > irb(main):039:0> NSIndexSet.alloc.indexSetWithIndex(3) > OSX::OCMessageSendException: NSIndexSet#indexSetWithIndex: - > methodSignature is nil. indexSetWithIndex is a method on the NSIndexSet class, not a method on NSIndexSet instances. You can tell the difference in the Xcode documentation because class methods have a leading '+' and instance methods a '-'. So you either want: NSIndexSet.indexSetWithIndex(3) or NSIndexSet.alloc.initWithIndex(3) Hope that helps Jonathan |