Re: NSTextView binding redisplay
Re: NSTextView binding redisplay
- Subject: Re: NSTextView binding redisplay
- From: Steven Spencer <email@hidden>
- Date: Sun, 02 May 2004 23:13:35 +0100
Hello,
Sorry, I was mistaken and the released string isn't the cause.
I've created a simple project that illustrates the issue :
http://homepage.mac.com/steven_sp/.cv/steven_sp/Public/TextViewBinding.zip-link.zip
The issue occurs when more than one textview is bound to the selection of a NSArrayController.
When the selection changes, only one of the textviews is re-displayed properly.
For example, when a multi-line-wrapping string is selected in the table, followed by selection of
a non-wrapping single line string, the single line string is displayed in the textview and the remaining
text from the multi-line string isn't removed during re-display. If the mouse pointer is moved over
the window close and minimise icons or the first responder is changed, then the textview display is updated.
Is there something wrong with my code / bindings ?
I'm using Xcode 1.2 on OS 10.3.3 Build 7F44.
Thankyou for any help.
- Steve Spencer
>
Message: 2
>
Date: Sun, 02 May 2004 14:40:14 +0100
>
From: Steven Spencer <email@hidden>
>
To: email@hidden
>
Subject: Re: NSTextView binding redisplay
>
>
Hi,
>
>
I've solved the display problem.
>
The symptom is caused by asking a textview to display a string that has already been released.
>
>
- Steve Spencer
>
>
>Message: 2
>
>Date: Fri, 30 Apr 2004 00:26:43 +0100
>
>From: Steven Spencer <email@hidden>
>
>To: email@hidden
>
>Subject: NSTextView binding redisplay
>
>
>
>Hello,
>
>
>
>I hope someone can help with this issue :
>
>
>
>I have a NSTextView bound to the selection of a NSObjectController in Interface Builder. The selection is controlled by a NSTableView whose columns are bound to the arrangedObjects in the object controller. The table view permits single selection only.
>
>(Reason for this strange set-up : The text view can display multiple lines of text whereas the table view can display only a single line).
>
>When the object controller selection changes (via the table view), the text view is updated. Often, the text view doesn't completely draw the string unless the table view is clicked a second time or a different control becomes the first responder.
>
>Is it necessary to send the text view a setNeedsDisplay:YES message each time after its value is set ? I thought this would be done automatically.
>
>If this is indeed the way to go, what's the best method ?
>
>
>
>Thanks.
>
>
>
> - Steve Spencer
>
>
>
>-- __--__--
>
>
--__--__--
_______________________________________________
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.