Re: Scrolling in TextView
Re: Scrolling in TextView
- Subject: Re: Scrolling in TextView
- From: Shane Stanley <email@hidden>
- Date: Mon, 08 Nov 2010 21:05:26 +1100
- Thread-topic: Scrolling in TextView
On 8/11/10 5:22 PM, "Paul G" <email@hidden> wrote:
> I believe textStorage is being counted. And I think if i'm not wrong
> textStorage is a object?
Yes; the textStorage() method returns a textStorage object, which is
basically a kind of attributed string that you can modify.
> So can I instead count the textView and what is already displayed on it?
That's what you use textStorage for -- you call textStorage() to get the
object, and then you call its length() method.
>
> Basicly I want to make this textView automatically scroll down as new lines
> are added:
>
> Code below:
>
> on debugLog(theInput)
> set AppleScript's text item delimiters to return
> set debugList to debugList & theInput & "---"
>
> debugView's setString_(debugList as string)
setString_ is a *text field* method, not a text view method. To add text to
a text view, you either use insertText_, or you get the textStorage object
and modify that.
> set newTextLength to debugView's textViews's |length|() as integer
Text views don't have a length method. You need to get the length of the
textStorage object.
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden