I humbly request some improvements to the TextBufferControl.
Over time I experimented with it a bit and there where some limitations that I simply cannot overcome in a meaningful way.
- Only the first 8 links in a line added with AddMessage are working.
I already had trouble with people posting item links in chat for a while, but never looked into why it happened. As I added a new feature to one of my addons I noticed this was happening more often. After some trial and error I found that it is a limitation of the control itself and not something that an addon was causing.
Posting the following snippet in chat shows what I mean:
Code:
/script d("|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h|H1:book:2631|h|h")
The first 8 links work fine, but the remaining don't do anything when clicked.
- A GetMessage function would make life a lot easier in some situations.
Why have a buffer when we can't read it?
One way how I could imagine this is that AddMessage and a new method GetCurrentIndex or GetNextIndex (whichever you like more) give me a number and GetMessage(integer index) returns the message.
- Add proper support for icon links.
Right now I somehow get this by squeezing an icon between two links like this:
Code:
|Hignore:linkType:data|h\13|h|tw:h:path|t|Hignore:linkType|h\13|h
I would prefer it if it worked like this:
Code:
|Hignore:linkType:data|h|tw:h:path|t|h
Take note that I don't want to send this via chat. I just want to show it locally to the user.
- Another thing I would love from an UX perspective is the ability to mark and copy text directly like in the EditControl.
When using Ctrl+C it should just copy the text as it is shown to the user.
A nice bonus would be a handler that receives the raw marked text on right click so us addon devs have a way to do interact with it.
Please consider adding any or all of these. It would really make things easier for me
P.S. Also can you maybe re-enable custom links in chat. I have a few ideas that would look much nicer when hidden in a link.