From: Rod S. <rsc...@xm...> - 2007-11-03 17:18:12
|
I have the following Ruby code in my RubyCocoa app (in which I have mostly Objective-C with some Ruby). class BackpackReminder def CSS_class date = NSDateToRubyDateTime(self.date) now = DateTime.now days_from_now = date.jd - now.jd if days_from_now <= 30 then "day#{days_from_now}" else "month#{self.months_from_now}" end end end BackpackReminder is an Objective-C class, so I am reopening this class and adding the CSS_Class method. This worked fine in Tiger. When I run the app I get the following: 11/3/07 12:55:52 PM PackRat[1109] PageGenerator#generateHTML: OSX::OCMessageSendException: Can't get Objective-C method signature for selector 'CSS:class' of receiver #<OSX::BackpackReminder_BackpackReminder_:0x265a5c class='BackpackReminder' id=0x6115b0> 11/3/07 12:55:52 PM PackRat[1109] Exception raised during posting of notification. Ignored. exception: 'Can't get Objective-C method signature for selector 'CSS:class' of receiver #<OSX::BackpackReminder_BackpackReminder_:0x265a5c class='BackpackReminder' id=0x6115b0>' invoked observer method: '*** - [PackRatAppDelegate tableViewSelectionDidChange:]' observer: 0x6f3dd0 notification name: 'NSTableViewSelectionDidChangeNotification' If I rename the method and remove the underscore and rename it something like CSSClass, I get the same message (with the method name changed of course). Has something changed in the Leopard version of RubyCocoa that prevents you from reopening classes and adding methods? Rod Schmidt |