Text Input problems
Text Input problems
- Subject: Text Input problems
- From: Dominik Wagner <email@hidden>
- Date: Mon, 30 Jan 2006 12:01:15 +0100
Hi all,
I have the following problem: In SubEthaEdit I need to know if we are
composing characters in the textviews
textView:shouldChangeTextInRange:replacementString: to know if I have
to check the encoding of the inserted string. NSTextView's
hasMarkedText helps here, but the problem is it also returns true
when it is in the act of umarking. However I need to know this,
because only then the text gets inserted permanently into the
textstorage, and on that occasion i have to check.
For this i tried to wrap the unmarkText method in my NSTextView
subclass like this:
- (void)unmarkText {
I_isUnmarking = YES;
[super unmarkText];
I_isUnmarking = NO;
}
however, after not working and adding some nslogs and debug symbols
this method didn't get called at all. This seemed very odd to me,
because when breakpointing inside my
textView:shouldChangeTextInRange:replacementString: -[NSTextView
unmarkText] was an the callstack.
If anyone can explain to me, why this didn't work, I'd appreciate it
greatly.
On a sidenote, using magic hat, i found that the internal method
_isUnmarking does exactly what i need. I'd be happy if this method
would be exposed, because in my case I really need it.
Best,
dom
--
Dominik Wagner Mail: email@hidden
TheCodingMonkeys http://www.codingmonkeys.de/
Blog - DasGenie: !Scrap http://scrap.dasgenie.com/
_______________________________________________
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