[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] SCTextView bugs

On 23 Dec 2008, at 16:37, Scott Wilson wrote:

Execute the following, scroll down, and then click on the post window. The text view scrolls back to the top and the scroller disappears.

Also it often seems to happen the text view doesn't wrap correctly, and the text is hidden behind the vertical scroll bar.


w = SCWindow.new("Text View Example",Rect(100,SCWindow.screenBounds.height-400, 520,300)).front;
t = SCTextView(w.asView,Rect(10,10, 500,200));

t.open("Help/Help.html");  // load an html file

Okay, the following diff seems to fix the first bug, and maybe the second one too.

Index: /code/SuperCollider/Source/app/SCCocoaView.M
--- /code/SuperCollider/Source/app/SCCocoaView.M (revision 8262)
+++ /code/SuperCollider/Source/app/SCCocoaView.M (working copy)
@@ -355,7 +355,7 @@
  mLayout.bounds = mBounds;
  [mScrollView setFrame: SCtoNSRect(mLayout.bounds)];
- [mTextView setFrame: SCtoNSRect(mLayout.bounds)]; // not needed - br
+ //[mTextView setFrame: SCtoNSRect(mLayout.bounds)]; // not needed - br
  // [mScrollView setBounds: SCtoNSRect(mBounds)];
  // [mTextView setBounds: SCtoNSRect(mBounds)];

Seems br was correct! Not only not needed but messing things up.

I'll commit if there is no objection.