How to validate an entry in a table?

Discussion in 'Mac Programming' started by AussieSusan, Sep 15, 2008.

  1. AussieSusan macrumors member

    May 29, 2006
    Melbourne, Australia
    I have a (single column) table view linked to an NSArrayController that has a custom class definition as its 'Class Name'. I also have KVC compliant methods to populate the array controller within my 'model'. I can see the 'countOf...' and 'objectIn...AtIndex' methods being called and the table contains the correct data.

    I have the 'Validates Immediately' option set on both the table column binding and the controller content array binding.

    My problems come when I alter the contents of an entry in the table. Firstly, the only 'validate...:error:' method that is called is on the custom class for the field that is updated.

    Secondly, the 'insertObject:in...:AtIndex' and similar (especially the 'replaceObjectIn...AtIndex:withObject:') methods are not called.

    I have checked and rechecked that the KVC names include the correctly capitalised name of the class.

    How can I get the validation (and other) routines to be called?



Share This Page