是否可以在 Cocoa 中绑定空占位符?
我有一个表格,其中某些单元格将为零,直到用户填写它们,但我希望我可以更改空占位符(即,当该单元格的特定值为 nil 时它显示的值) code>) 取决于用户已经填写或配置的应用程序的其他部分。 有点像自动完成,但又不完全是。
是否可以绑定空占位符值,或者我必须手动模拟此行为?
编辑:
为了澄清这一点,我正在寻找一种解决方案,为各个单元格提供不同的占位符值,而不是将单个占位符值应用于整个表或整个表列。
I have a table where certain cells will be nil until the user fills them in, but I was hoping that I could change the null place-holder (i.e. the value it displays when the particular value for that cell is nil
) depending on other parts of the application the user has already filled in or configured. Sort of like an auto-complete but not quite.
Is it possible to bind the null place-holder value or will I have to emulate this behaviour manually?
Edit:
To clarify, I'm looking for a solution to have distinct place-holder values for individual cells, not a single place-holder value to apply to the entire table or entire table column.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
占位符值为 创建绑定时作为选项字典的一部分传递。 由于字典中的值不是可以绑定的,所以我认为没有任何“自动”方法可以做到这一点。
The placeholder value is passed as part of the options dictionary when a binding is created. Since a value in a dictionary is not something that can be bound, I don't think there's any "automatic" way to do this.