textView:shouldChangeTextInRange:replacementString:
textView:shouldChangeTextInRange:replacementString:
- Subject: textView:shouldChangeTextInRange:replacementString:
- From: Ken Victor <email@hidden>
- Date: Wed, 4 Apr 2007 16:18:55 -0700
i have an NSTableView bound to an NSArrayController. for one column
of this table, i have provided a subclass (MyTextFieldCell) of
NSTextFieldCell in IB. at the moment, the only method in my subclass
is:
- (BOOL)textView:(NSTextView *)aTextView
shouldChangeTextInRange:(NSRange)affectedCharRange
replacementString:(NSString *)replacementString
and this method is called if i type into a cell in the appropriate
column in the table. i don't understand why as i have not set any
delegates that would cause this delegate method to be called. below
is the stack trace. can anyone explain why this is being called at
this time? (note, i'm glad this is being called, but simply don't
understand why...)
#0 0x0015d3c8 in -[MyTextFieldCell
textView:shouldChangeTextInRange:replacementString:] at
MyTextFieldCell:111
#1 0x933722b9 in -[NSTextView(NSSharing)
shouldChangeTextInRanges:replacementStrings:]
#2 0x9337131b in -[NSTextView insertText:]
#3 0x93370d7f in
-[NSKeyBindingManager(NSKeyBindingManager_MultiClients)
flushTextForClient:]
#4 0x9336de1c in -[NSTSMInputContext interpretKeyEvents:]
#5 0x9336d170 in -[NSView interpretKeyEvents:]
#6 0x9336d05e in -[NSTextView keyDown:]
#7 0x9336cbe1 in -[NSWindow sendEvent:]
#8 0x0009b994 in -[KVWindow sendEvent:] at KVWindow.mm:404
#9 0x9335e350 in -[NSApplication sendEvent:]
#10 0x000af96d in -[KVApplication sendEvent:] at KVApplication.mm:276
#11 0x93288dfe in -[NSApplication run]
#12 0x9327cd2f in NSApplicationMain
#13 0x00003258 in main at main.m:12
thanx,
ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden