NSPredicateEditor/NSRuleEditor 行的不同行模板
我试图弄清楚是否可以对 NSPredicateEditor (或者,如果需要,NSRuleEditor)中的特定行使用不同的行模板。我有一个屏幕截图,我认为它可以帮助我更清楚地解释这一点。
在这个人为的示例中,我只希望人们生成一个过滤器来查找高于特定大小的特定路径。因此,在 A 部分(Any 块)中,用户只能指定路径规则(并且用户可以添加其他路径)。在 B 部分中,我只希望“大小”选项可用。
文档中没有任何东西跳到我身上(或者,确实跳到我身上的东西最终变成了其他东西),但似乎这是一种可能派上用场的东西,这让我认为这可能是可能的。
I'm trying to figure out if it's possible to use different row templates for specific rows in an NSPredicateEditor (or, if need be, an NSRuleEditor). I've got a screenshot that I think helps me explain this more clearly.
In this contrived example, I only want people to generate a filter that looks for a specific path above a certain size. So, in Section A (the Any block), users can only specify path rules (and the users can add additional paths). In section B, I only want the Size option to be available.
Nothing's jumping out at me from the docs (or, the stuff that does jump out at me ends up being something else), but it seems like this is the sort of thing that might come in handy, which makes me think it might be possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我对 NSPredicateEditor 的理解,这是不可能的。如果您使用
NSRuleEditor
自己完成所有操作,您也许可以摆动它,但我还没有经常使用该类。简而言之:如果您自己实现,这是可能的。对于内置的东西,我 99.9% 确定它不是可配置的行为。
From what I understand about
NSPredicateEditor
, this is not possible. You might be able to swing it if you do everything yourself with anNSRuleEditor
, but I haven't played with that class as much.So in a nutshell: if you implement it yourself, it's possible. With the built-in stuff, I'm 99.9% certain that it's not a configurable behavior.