A caveat: I am asking about Rift code, but right now, Rift uses Lua 5.1, and the game's slash commands and events are basic tables, thus table.whatever works.
In simplistic terms, I have read that tostring() works on anything, but I think I need something a bit more complex.
The original question was posted here, but after playing with it, I still have questions. Kreiri's answer was helpful, but I need the text to display in bugFrame.text, not a Print statement, which only goes to the chat frame.
Essentially, the return of the tdump() function is want I want, all formatted like he's got it. I thought about something like bugFrame.text = tdump() or similar, but that requires kstring to give a return value.
Yes, I am writing a BugGrabber type addon. The BugSack equivalent will have to wait until the API supports GUI creation.
Any suggestions, tips, feedback, help, please and thank you. All is welcome.
Sounds like you want table.concat() with a newline as the separator.
Looking at that tdump() function, you'd want to replace the print() calls with an insert into a table. Then at the end of the function you'd call table.concat on that table to generate one large string.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
In simplistic terms, I have read that tostring() works on anything, but I think I need something a bit more complex.
The original question was posted here, but after playing with it, I still have questions. Kreiri's answer was helpful, but I need the text to display in bugFrame.text, not a Print statement, which only goes to the chat frame.
Essentially, the return of the tdump() function is want I want, all formatted like he's got it. I thought about something like bugFrame.text = tdump() or similar, but that requires kstring to give a return value.
Yes, I am writing a BugGrabber type addon. The BugSack equivalent will have to wait until the API supports GUI creation.
Any suggestions, tips, feedback, help, please and thank you. All is welcome.
Looking at that tdump() function, you'd want to replace the print() calls with an insert into a table. Then at the end of the function you'd call table.concat on that table to generate one large string.