Re: Making an NSTextView have a data source
Re: Making an NSTextView have a data source
- Subject: Re: Making an NSTextView have a data source
- From: Ondra Cada <email@hidden>
- Date: Thu, 9 May 2002 18:49:30 +0200
On Thursday, May 9, 2002, at 07:15 , Mikey wrote:
It actually did work, but I was afraid I might be abusing the intent of
the -drawRect: method by changing the contents of the text view while the
main thread is trying to draw it. If you say that this has worked for
you in the past, that's good enough for me -- you should have told me
sooner so I wouldn't re-invent the wheel ;)
Nope, I used -tableViewSelectionDidChange: to update a text view. Never I
tried to do that from -drawRect:!
Do you know how to get the scrollbar not to flicker? I actually updated
the code I posted to surround the updating of the text view's storage
object with the -beginEditing and -endEditing methods and it seems to
have helped the flicker problem a bit: now it only seems to happen when I
go from displaying no scrollbar to displaying a scrollbar with a small
scroll thumb; the thumb appears very large for a split second, then it
shrinks to the right size.
I am somewhat afraid that I don't understand quite well what are you doing,
but *perhaps* what are you looking for are NSWindow methods
enableFlushWindow/disableFlushWindow (provided they still work properly
with the Quartz non-server thing, which I somewhat doubt!).
On Wednesday, May 8, 2002, at 06:48 AM, Ondra Cada wrote:
Message: 7
Date: Wed, 8 May 2002 13:48:44 +0200
Subject: Re: Making an NSTextView have a data source
Cc: email@hidden
To: Mikey <email@hidden>
From: Ondra Cada <email@hidden>
On Wednesday, May 8, 2002, at 06:33 , Mikey wrote:
At first I tried to do the updating right in the
-tableViewSelectionDidChange: method, but that didn't work very well
because the GUI wouldn't always get updated correctly (sometimes some of
the text was missing, sometimes the scrollbar was wrong, etc.). I was
kind of surprised by this because I thought that I was receiving the
-tableViewSelectionDidChange: method within the context of the main
thread where drawing is usually okay.
Could you add more details why (or how) this did not work for you? I've
used exactly this technique umpteen times, and always it worked for me
well?
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.