[Rubycocoa-devel 545] Re: Can't get Objective-C method signature for selector

アーカイブの一覧に戻る

lc3b****@mac***** lc3b****@mac*****
Wed Jan 3 09:01:43 JST 2007


*Please let me know if I should be submitting these potential bugs on  
this mailing list or to a tracker somewhere.*

I just checked out the latest version from Subversion (revision 1318)  
and tested in on 10.4.8

Adding and deletion works fine now (thanks Laurent!). But there are  
two other problems that I have detected:

1)  OSX::NSAlertOtherReturn is not being detected.

[MyDocument.rb: 49-62]

   def remove(sender)
     selected = @person_controller.selectedObjects
     choice = OSX::NSRunAlertPanel("Delete", "Do you want to delete % 
@ records?", "Delete", "Cancel", "Zero raise", selected.size)

     if  choice == OSX::NSAlertDefaultReturn
       @person_controller.remove(sender)
     elsif choice == OSX::NSAlertOtherReturn
       OSX::NSLog("other return detected") #<= THIS NEVER GETS CALLED
       @person_controller.selectedObjects.each do |p|
        p.expected_raise = 0.0
       end
     end
   end


2) Editing the text in the table (clicking with the mouse and typing  
and then hitting enter to commit the edit and move on the the next  
row in the table) cause a crash. There is nothing reported to the Run  
Log but a debugger session pops up.
This happens even if DISABLE observing for undo (the two functions  
below):

[MyDocument.rb:91-99]
   def startObservingPerson(person)
     person.addObserver_forKeyPath_options_context(self,  
"person_name", OSX::NSKeyValueObservingOptionOld, nil)
     person.addObserver_forKeyPath_options_context(self,  
"expected_raise", OSX::NSKeyValueObservingOptionOld, nil)
   end

   def stopObservingPerson(person)
     person.removeObserver_forKeyPath(self, "person_name")
     person.removeObserver_forKeyPath(self, "expected_raise")
   end

Currently I do not know of any way to provide more information on this.


--
Nicholas Chen

On Jan 2, 2007, at 3:57 PM, rubycocoa-devel- 
reque****@lists***** wrote:
> Hey, it was easier than expected, I just committed a fix there (with
> some new test cases). If you can check it out, it would be great (I
> didn't test it on Tiger yet :-)).
>
> Laurent





More information about the Rubycocoa-devel mailing list
アーカイブの一覧に戻る