I'm trying to configure an NSPredicateEditor
(in Interface Builder) to edit the predicate for an NSMetadataQuery
.
As a first step, I'm trying to configure an NSPredicateEditorRowTemplate
to accept key path(s) for the left-side expression, trying a single keyPath (kMDItemTextContent
) to get started.
I can't figure out how to get all the pieces into IB. I've selected the row template, and set "Left Exprs" to "Key Paths" in the IB Attributes Inspector. But, using Apple's PhotoSearch example as a model, it appears that I should enter a user-readable attribute name (say, "Content") here; I can't figure out how to bind it to "kMDItemTextContent
".
I've dissected the (correctly-configured) NIB in PhotoSearch(*), and inside it there is an NSKeyPathExpression
specifying a metadata attribute attached to an NSPopUpButton
/NSPopUpButtonCell
.
I can't figure out where to navigate in IB to find the NSPopUpButton
, and I'm not sure what I'd do to bind it to an NSExpression
.
Any help appreciated.
(*) In case you're wondering, I got inside the NIB by converting it to a XIB, confirming that it still builds correctly, then examining it with BBEdit.