alternative to text DAT for message log

I’m writing to a text DAT to log instant messages. Problem is that once the log becomes longer than the viewport, writing new messages scrolls the text DAT all the way to the top. I want it to continue scrolling down like the table DAT or traditional instant messengers. There doesn’t seem to be any way to change this function, but I can’t find any other simple operators to use.

The text TOP and field COMP have proven to be a real pain when working with long strings. I’m considering the List COMP as a possibility, but there is so much to learn just to get it up and running, and I wanted to do something just quick and dirty to be able to implement this within the next week.

Any ideas for elegant solutions?

If you don’t need all the messages, can you use a Fifo DAT to only keep the last n lines? Or use a Select DAT to show only the last n lines?

It does look like the scroll position gets reset on the Text DAT when text is added but not the Table DAT (once you’ve scrolled to the bottom, adding will keep the scrollbar positions), which is something that can be fixed. So using the Table DAT instead is also a possibility.

The table DAT isn’t ideal, because I want to support long multi-line messages. I suppose I could have a method that looks at the length of the message and then breaks it up into multiple rows in a table, but a text DAT is certainly cleaner and simpler to read.

I’ve tried treating the lines in the text DAT the way I would rows in a table, but it seems there’s no way to utilize them in Python or with other DATs. It would be great if I could do things like op(‘text1’)[0], op(‘text1’).readLine(1), or even include a line number as an optional argument in the write() method. But I’m not sure how useful these would be outside using the text DAT as a UI element. Hopefully there will be something just right when the advanced widgets come out!