FROM : Bryan Zarnett
DATE : Sun Apr 03 09:38:55 2005
Hi Roland,
Create a class that will act as a delegate for your NSTextView and hook
it up through interface builder. In the delegate implement one or all
of the following:
- (void)textDidBeginEditing:(NSNotification *)aNotification
- (void)textDidChange:(NSNotification *)aNotification
- (void)textDidEndEditing:(NSNotification *)aNotification
Hope this helps.
On 2-Apr-05, at 7:42 PM, Roland Silver wrote:
> Hi, Bryan,
> I'm not sure how to follow your advice. Do you mean that I should
> subclass NSTextStorage or create a delegate for it? The documentation
> states that textStorageWillProcessEditing "Informs the delegate that
> an NSTextStorage object is about to process edits."
> If I should delegate, then from what to what?
> ------------------------------------------------------
>
> On Apr 2, 2005, at 10:13 AM, Bryan Zarnett wrote:
>
>> I believe you have to work with the TextViews NSTextStorage object to
>> manage this.
>>
>> I believe the API you can use is "-
>> (void)textStorageWillProcessEditing:(NSNotification *)aNotification"
>>
>>
>> Cheers,
>> Bryan
>>
>> On 2-Apr-05, at 11:59 AM, Roland Silver wrote:
>>
>>> I have a simple Cocoa application with a controller and a window
>>> with an NSTextView. I want to intercept keydown events on their way
>>> to the text view, process them with a function or method, and send a
>>> possibly different keydown event on to the text view.
>>> Nothing I try works.
>>> Any suggestions?
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Cocoa-dev mailing list (<email_removed>)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>>
>>> This email sent to <email_removed>
>>
>>
DATE : Sun Apr 03 09:38:55 2005
Hi Roland,
Create a class that will act as a delegate for your NSTextView and hook
it up through interface builder. In the delegate implement one or all
of the following:
- (void)textDidBeginEditing:(NSNotification *)aNotification
- (void)textDidChange:(NSNotification *)aNotification
- (void)textDidEndEditing:(NSNotification *)aNotification
Hope this helps.
On 2-Apr-05, at 7:42 PM, Roland Silver wrote:
> Hi, Bryan,
> I'm not sure how to follow your advice. Do you mean that I should
> subclass NSTextStorage or create a delegate for it? The documentation
> states that textStorageWillProcessEditing "Informs the delegate that
> an NSTextStorage object is about to process edits."
> If I should delegate, then from what to what?
> ------------------------------------------------------
>
> On Apr 2, 2005, at 10:13 AM, Bryan Zarnett wrote:
>
>> I believe you have to work with the TextViews NSTextStorage object to
>> manage this.
>>
>> I believe the API you can use is "-
>> (void)textStorageWillProcessEditing:(NSNotification *)aNotification"
>>
>>
>> Cheers,
>> Bryan
>>
>> On 2-Apr-05, at 11:59 AM, Roland Silver wrote:
>>
>>> I have a simple Cocoa application with a controller and a window
>>> with an NSTextView. I want to intercept keydown events on their way
>>> to the text view, process them with a function or method, and send a
>>> possibly different keydown event on to the text view.
>>> Nothing I try works.
>>> Any suggestions?
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Cocoa-dev mailing list (<email_removed>)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>>
>>> This email sent to <email_removed>
>>
>>
| Related mails | Author | Date |
|---|---|---|
| Roland Silver | Apr 2, 18:59 | |
| Bryan Zarnett | Apr 2, 19:13 | |
| Satoshi Matsumoto | Apr 2, 22:35 | |
| Roland Silver | Apr 3, 02:36 | |
| Roland Silver | Apr 3, 02:42 | |
| James Spencer | Apr 3, 06:43 | |
| Bryan Zarnett | Apr 3, 09:38 | |
| Bryan Zarnett | Apr 3, 10:07 | |
| Satoshi Matsumoto | Apr 3, 13:54 | |
| Douglas Davidson | Apr 4, 17:43 |






Cocoa mail archive

