Applescript Objective C: how to pass field value to other fields

Please forgive the noob…

In my user interface, built in IB, I have a tab view with three tabs. There are some fields existing on all tabs. When entering a value in one of these fields, it has to be passed to the other two as well.

My attempt to do that is as it has been described, using controlDidChange. The field's action is delegated to it. The fields all have a correct referencing outlet specified.

I am using this code:

Code Block
   on controlTextDidChange_(aNotification)
    if aNotification's object() is rau_gros_res_val then
      set rvlch to rau_gros_res_val's stringValue()
      kau_gros_res_val's setStringValue_(rvlch)
      uau_gros_res_val's setStringValue_(rvlch)
    end if
end

Building is successful, but when I run it, and change the value in the field, I get this error message:

Code Block
*** -[AppDelegate controlTextDidChange:]: -[NSTextField object]: unrecognized selector sent to instance 0x1006223b0 (error -10000)


Am I doing something completely wrong on beginner's level? Or did I miss something obvious?

Any hint, help, etc. is highly appreciated.


Replies

Did you set the delegate to AppDelegate ?

Check here all the steps:
https://stackoverflow.com/questions/19649484/updating-a-label-as-a-user-is-typing-using-cocoa-applescript
That's what I used as a guide.