NSTextInput protocol - 'unmarkText' is late?
NSTextInput protocol - 'unmarkText' is late?
- Subject: NSTextInput protocol - 'unmarkText' is late?
- From: Jonathan del Strother <email@hidden>
- Date: Fri, 12 Aug 2005 02:41:39 +0100
I'm implementing my own text input control, and having some issues
with marked text...
If I insert some marked text, I don't get informed of the next
keypress. Only after a second keypress do I get the 'unmarkText'
call, and then I receive key events as normal.
Say I want to insert an accented 'e', then t. The sequence of events
is as follows (user input appears in brackets, NSTextInput functions
being called are in square brackets)
(user presses Alt-e)
[setMarkedText] - has an apostrophe mark
(user presses e)
[insertText] - with é as the text
(user presses t)
[hasMarkedText] - since I haven't yet received 'unmarkText', I return
YES. Nothing else happens
(user presses t again)
[hasMarkedText]
[unmarkText] - finally!
[insertText] - with t as the text.
Did that make sense? Basically, I think I should be receiving
unmarkText as soon as the 'é' character is complete, whereas I'm
receiving it 1 keypress too late, regardless whether that keypress is
a letter, a delete key, whatever.
Am I returning the correct value for hasMarkedText? I'm currently
storing a 'hasMark' boolean, which I'm setting to YES when I receive
setMarkedText, and NO on unmarkText. Am I supposed to clear it
whenever I receive an insertText event?
Thanks for any help,
Jon _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden