O
Ourge
Guest
Hello, I'm trying to modify my UI content when my client is ready with this code :
Account::Account(String^ token) :
client(new DiscordClient::Client),
connected(false),
token(token)
{
InitializeComponent();
client->setDisconnectionHandler([&](const uint16_t& code, const winrt::hstring& reason) -> void
{
String^ message = L"Code: ";
message += ref new String(std::to_wstring(code).c_str());
message += L",\nReason: ";
message += ref new String(reason.c_str());
Windows::UI:
opups::MessageDialog(message).ShowAsync();
});
client->setReadyHandler([&](const DiscordClient::User& user) -> void
{
String^ username = ref new String(user.username.c_str());
statusBar->IsIndeterminate = true; // HERE
statusBar->ShowError = false;
statusBar->ShowPaused = false;
});
}
Unfortunately, an exception with no informations on it is thrown at the line with "// HERE". Is there an obvious reason that I am missing for that ? thanks
Continue reading...
Account::Account(String^ token) :
client(new DiscordClient::Client),
connected(false),
token(token)
{
InitializeComponent();
client->setDisconnectionHandler([&](const uint16_t& code, const winrt::hstring& reason) -> void
{
String^ message = L"Code: ";
message += ref new String(std::to_wstring(code).c_str());
message += L",\nReason: ";
message += ref new String(reason.c_str());
Windows::UI:
![Stick out tongue :P :P](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f61b.png)
});
client->setReadyHandler([&](const DiscordClient::User& user) -> void
{
String^ username = ref new String(user.username.c_str());
statusBar->IsIndeterminate = true; // HERE
statusBar->ShowError = false;
statusBar->ShowPaused = false;
});
}
Unfortunately, an exception with no informations on it is thrown at the line with "// HERE". Is there an obvious reason that I am missing for that ? thanks
Continue reading...