NSOldSelectedCharacterRange output is funky
NSOldSelectedCharacterRange output is funky
- Subject: NSOldSelectedCharacterRange output is funky
- From: Philippe Hausler <email@hidden>
- Date: Sat, 10 May 2003 12:59:26 -0400
- (void)someTextGotChanged:(NSNotification *)aNotification
{
NSLog(@"Text changed");
NSLog(NSStringFromRange([[[aNotification userInfo] objectForKey:
@"NSOldSelectedCharacterRange"] rangeValue]));
NSLog(NSStringFromRange([[aNotification object] selectedRange]));
}
When the notification fires the selected range is valid, but the old
selected range is either an absurdly high number or its {1, 1} and in
both cases its nowhere near the previously selected text before the
change. No matter the action preformed, the result is reproducible so I
don't think its an invalid pointer to data. Is this the right way of
accomplishing this? Are there any other ways of getting the changes
made into a NSTextView if all that is available are notifications?
Thanks for any insight,
Philippe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.