有没有办法在 NSTableView 中使用与可编辑 NSSecureTextFieldCell 的绑定?
我有一个包含多个列的 NSTableView,其中一列设置为使用 NSSecureTextFieldCell 作为其 dataCell。我正在使用正确配置的 NSArrayController
向该表提供数据。
问题是我的安全文本字段不想工作。它显示了它所保存的字符串的适当数量的点,但它不可编辑!我无法更改安全文本。
可以肯定的是,我用常规的 NSTextFieldCell 做了同样的事情,一切都很顺利。我已正确设置绑定,并且列设置为可编辑。
我能够找到对相同问题的引用 在 Apple 的开发者邮件列表中,但那里发布的解决方法是 2006 年的。
这个特定问题有解决办法吗?
或
是否有人有更好的解决方法,也许仍然允许使用绑定?
I have an NSTableView
with several columns, one of which is set up to use an NSSecureTextFieldCell
as its dataCell
. I am using a properly configured NSArrayController
to provide data to this table.
The problem is that my secure text field does not want to work. It shows an appropriate number of dots for the strings that it holds, but it is not editable! I am unable to make changes to the secure text.
Just to be sure, I did the same thing with a regular NSTextFieldCell
, and everything works like a charm. I have the bindings set up properly, and the column is set to be editable.
I was able to find a reference to the same problem on Apple's developer mailing list, but the workaround posted there is from 2006.
Is there a fix for this particular problem?
or
Does anyone have a better workaround, perhaps something that still allows the use of bindings?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我有用,至少在 Snow Leopard 上是这样。我还没有在 Leopard 上尝试过。请随意查看一下,看看您是否可以使其工作(或确认它不适合您)。
(顺便说一句,尽管我不幸选择了名称,但我绑定的是列,而不是单元格。)
Works for me, at least on Snow Leopard. I haven't tried it on Leopard yet. Feel free to have a look and see if you can make it work (or confirm that it doesn't work for you).
(BTW, despite my unfortunate choice of name, it is the column that I bound, not the cell.)