Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: How to avoid paste option in edit box (equivalent to (ctrl+v) in windows)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to avoid paste option in edit box (equivalent to (ctrl+v) in windows)



Hi David,

I am new to mac and i really don't have much more idea about the mac API's.
Can i have any API/function which could figure out that paste (ctrl+v in windows) option has been done.
Currently we are checking for each character which has been entered in the edit box and using strchr() api filtering it out.
If i could get that (ctrl+v) has been pressed then i can handle the scenario...
In windows i know that we have clipboard api's using which we can handle these kind of scenarios...
Is there something similar to Clipboard in mac????

Regards,
Dverma

On Fri, Mar 26, 2010 at 9:37 AM, David Dunham <email@hidden> wrote:
On 25 Mar 2010, at 20:56, dileep verma wrote:

> I have an edit box which should not accept special characters. I am able to
> filter these special character once if you are typing it using keyboard but
> if some copying and pasting any special character from anywhere, he is able
> to paste it.


OK, that's a better requirement.

And what happens if you use Edit > Special Characters, and then insert a special character? (Actually that may also be kEventTextInputUnicodeForKeyEvent and you're handling it.)

I think you want to handle kEventClassTextField / kEventTextShouldChangeInRange.

David Dunham     A Sharp, LLC
Voice/Fax: 206 783 7404     http://a-sharp.com
Efficiency is intelligent laziness.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: How to avoid paste option in edit box (equivalent to (ctrl+v) in windows) (From: David Dunham <email@hidden>)
 >Re: How to avoid paste option in edit box (equivalent to (ctrl+v) in windows) (From: dileep verma <email@hidden>)
 >Re: How to avoid paste option in edit box (equivalent to (ctrl+v) in windows) (From: David Dunham <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.