diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2023-09-06 14:09:00 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2023-09-06 14:09:00 +0300 |
commit | b51cef8c8eaafa873f2a62d967cc4fe62cc0d94e (patch) | |
tree | 73c563d2ca1125319de81f375b45693e651be0d6 /indra/newview/llfloaterluadebug.cpp | |
parent | c8711f4ea5d941d12ae7e6cf99302bfc3211dd3c (diff) |
addcallback to display error msg
Diffstat (limited to 'indra/newview/llfloaterluadebug.cpp')
-rw-r--r-- | indra/newview/llfloaterluadebug.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llfloaterluadebug.cpp b/indra/newview/llfloaterluadebug.cpp index c8b330f732..e7d220c503 100644 --- a/indra/newview/llfloaterluadebug.cpp +++ b/indra/newview/llfloaterluadebug.cpp @@ -71,8 +71,13 @@ LLFloaterLUADebug::~LLFloaterLUADebug() void LLFloaterLUADebug::onExecuteClicked() { + mResultOutput->setValue(""); + std::string cmd = mLineInput->getText(); - LLLUAmanager::runScriptLine(cmd); + LLLUAmanager::runScriptLine(cmd, [this](std::string msg) + { + mResultOutput->setText(msg); + }); } void LLFloaterLUADebug::onBtnBrowse() @@ -81,12 +86,17 @@ void LLFloaterLUADebug::onBtnBrowse() } void LLFloaterLUADebug::runSelectedScript(const std::vector<std::string> &filenames) -{ +{ + mResultOutput->setValue(""); + std::string filepath = filenames[0]; if (!filepath.empty()) { mScriptPath->setText(filepath); - LLLUAmanager::runScriptFile(filepath); + LLLUAmanager::runScriptFile(filepath, [this](std::string msg) + { + mResultOutput->setText(msg); + }); } } |