User-friendly representation of keyPath expressions for NSPredicateEditor

  • I'm creating NSPredicateEditor and NSPredicateEditorRowTemplates in
    code as the key paths for my left-hand expressions are dynamic and not
    known until run time. The row template is made using an array of key
    path expressions that look like:

    [NSExpression expressionForKeyPath:[... lookup to get dynamic keypath
    string here ...]]

    The new NSPredicateEditor view is a convenience dream, and the app
    works beautifully, but the left PopUpButton button that is rendered in
    the NSPredicateEditor view contains the literal key path
    "someKeyPath". In IB, it's easy to double-click on the pop-up button
    in the row template and provide a user-friendly substitution like "Not
    A Key Path Accessor".

    Is there an efficient way to do this in code when I'm creating my row
    templates, or should I be subclassing  NSPredicateEditorRowTemplate to
    override templateViews?

    Many thanks,
previous month january 2008 next month
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today