开发者

How do I Enable pasting a password into a NSSecureTextField?

For some reason some users of my application have to paste content into a NSSecureTextField , mostly because they're using tools to manage/generate their passwords and they can't easily type them. I've been trying to figure out a way to enable this, use another component with the same behavior that wo开发者_如何学JAVAuld be able to accept pasting or any other way to allow this. All hints are welcome.

It's also interesting that the Apple provided docs say that cut and copy are not possible, but doesn't say anything about pasting.


In recent versions of Mac OS X (I believe in 10.5 forward) pasting is allowed. You don't have to do anything as it is available by default. For older versions of OS X it was prohibited. If you take a look at the revision log for the documentation of NSSecureTextFieldCell it states:

2007-10-31 Removed the statement that pasting is not allowed

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜