开发者

NSPredicateEditor Just Won't Show Up

I'm having a really weird problem. I'm trying to put an NSPredicateEditor into my interface using 开发者_运维技巧IB, and when I build the app it just shows up as an empty gray rectangle. This is without my applying ANY CHANGES WHATSOEVER to the defaults, including not modifying the default templates. What could possibly be going on?


NSPredicateEditor works best when you bind it to some property (like an NSArrayController's filterPredicate).

The template you set up in IB is only to allow you to define the limitations of the rules (such as allowing the user to choose "first name" or "last name") but does not define what appears when the control is "live."

To modify an "empty" editor (array controller filter predicate or otherwise), connect a button or menu item's action to the editor view's -addRow: action. At runtime, clicking this will add an initial "rule" (following the constraints you specified in your IB template). You can even test that in IB itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜