Keeping a scroll view at vertical bottom?

Hi all,

I’m working on a new program that is going to upload files; in my Applscript Studio project, I’d like to have a window that lists all the files that have been uploaded.

I’ve gotten that far, but I’m having a (minor) issue with one thing: I want the list of uploaded files to always display the most recently uploaded files – e.g., it needs to be kept “scrolled down” to the bottom.

Is there an option in the interface builder to do this, and I’ve just managed to miss it? Or is this something that has to be coded in? I’ve done some research and seen some examples using a matrix instead of a text view but I’m not sure which route I should go.

Incidentally, this is the code I am using to update my uploaded files window:

set the contents of text view "Output" of scroll view "UploadedText" of window "Main Window" to (contents of text view "Output" of scroll view "UploadedText" of window "Main Window") & return & "¢ Uploaded file " & uploaded_file & " at " & time string of (current date)
	

any help or suggestions would be most welcome.

I have toyed with the idea of having the display in reverse chronological order, which would eliminate the need for scrolling down to the most recent file, but I’d really rather keep it in normal chronological order.

If I’ve missed something completely block-headed, please forgive me!

I know an objective-c way…

  1. add a new file to your project and make it an objective-c class… name it HMScrollTextView
  2. make the “h” file look like this
  1. make the “m” file look like this

Then in your code any time you want to scroll the text view to the end use the following. Note that myTextView is the reference to your text view… text view “Output” of scroll view “UploadedText” of window “Main Window”

call method "scrollTextViewToEnd:" of class "HMScrollTextView" with parameter myTextView