SubClassing NSMatrix

I have created a basic subclass of NSMatrix.

Everything seemed to work as I planned, however I cannot seem to reference certain properties/methods of NSMatrix. Perhaps I am not be referencing the parent’s methods the correct way?



script MyMatrix

     property parent : class "NSMatrix"

     on myMethod_(id)
          set myCell to my selectedCell --this is failing
     end myMethod_


end script


I have also tried “set myCell to parent’s selectedCell”. Obviously I am misunderstanding how subClassing works or I just have not implemented something correctly.

You call methods with parentheses:

selectedCell()

Sometimes it works without because of key-value coding, but this isn’t one of those cases.

Face meet palm…

Thanks that was it. I have found as I get older a good nights rest produces far better code than the days of 2:00am coffee coding.

Thanks Shane