wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
- AenBleidd
- Earned a small fee
- Posts: 10
- Joined: Mon Oct 02, 2017 1:51 am
- Location: Friedrichshafen, Germany
wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
Hello,
I described the problem here: https://stackoverflow.com/q/46511028/4210508
Please help me to solve it.
Thanks
I described the problem here: https://stackoverflow.com/q/46511028/4210508
Please help me to solve it.
Thanks
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
The first thing to check is if html->SelectionToText() actually returns the correct text or an empty string. I assume the latter.
Use the source, Luke!
- AenBleidd
- Earned a small fee
- Posts: 10
- Joined: Mon Oct 02, 2017 1:51 am
- Location: Friedrichshafen, Germany
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
html->SelectionToText() always return correct data. And this data is stored in wxTheClipboard. The problem is that this data doesn't appear in the system clipboard. If I cal wxTheClipboard->GetData() I see my data but when I try to paste it in text editor I see either empty string or old data.doublemax wrote:The first thing to check is if html->SelectionToText() actually returns the correct text or an empty string. I assume the latter.
So it looks like the issue with wxTheClipboard itself (despite it returns 'true' when I call wxTheClipboard->SetData()).
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
In that case i can only assume that the wxTextDataObject contains a different format in one of the cases, maybe one is wxDF_TEXT and the other is wxDF_UNICODETEXT, but only one of them works. Research further in that direction.
http://docs.wxwidgets.org/trunk/classwx ... 5cfbdb9188
http://docs.wxwidgets.org/trunk/classwx ... 5cfbdb9188
Use the source, Luke!
- AenBleidd
- Earned a small fee
- Posts: 10
- Joined: Mon Oct 02, 2017 1:51 am
- Location: Friedrichshafen, Germany
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
So it means that
copyTextToClipboard(html->ToText());
and
copyTextToClipboard(html->SelectionToText());
on the same content give different results?
Both these methods return wxString which means they are both Unicode (content of my wxHtmlWindow contains Unicode characters).
So what's wrong with them?
I can provide you the strings that I try to copy to clipboard.
Thanks
copyTextToClipboard(html->ToText());
and
copyTextToClipboard(html->SelectionToText());
on the same content give different results?
Both these methods return wxString which means they are both Unicode (content of my wxHtmlWindow contains Unicode characters).
So what's wrong with them?
I can provide you the strings that I try to copy to clipboard.
Thanks
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
I only work under Windows, so i can't test this.
The first thing you should check if my theory is correct and the wxTextDataObjects are indeed different in both cases.
The first thing you should check if my theory is correct and the wxTextDataObjects are indeed different in both cases.
Use the source, Luke!
- AenBleidd
- Earned a small fee
- Posts: 10
- Joined: Mon Oct 02, 2017 1:51 am
- Location: Friedrichshafen, Germany
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
I checked: in both case data type is wxDF_UNICODETEXT.
The text that can be copied:
$7 = L"\nОбщие\nURL\nhttp://einstein.phys.uwm.edu/\nИмя участника\nVitalii Koshura\nКоманда\nВыделено ресурсов\n100\nИспользование диска\n8,45 MB\nИдентификатор компьютера\n11724403\nПриостановлен вручную\nнет\nНе запрашивать задания\nнет\nРазмещение компьютера\nпо умолчанию\nЗавершённых успешно заданий\n0\nЗавершённых неудачно заданий\n0\nОчки\nУчастник\n3.020.308 всего, 1.975,57 в среднем\nКомпьютер (хост)\n57.125 всего, 56,66 в среднем\nПланировщик\nПриоритет планировщика\n-2,12\nПоправочный коэффициент продолжительности\n1,7690\nПоследний ответ планировщика\nСуб 30 Сен 2017 22:32:31\n"
The text that cannot be copied (also it brokes the ability to copy the text above):
$8 = L"\nВыделено ресурсов\n100\nИспользование диска\n8,45 MB\n"
The text that can be copied:
$7 = L"\nОбщие\nURL\nhttp://einstein.phys.uwm.edu/\nИмя участника\nVitalii Koshura\nКоманда\nВыделено ресурсов\n100\nИспользование диска\n8,45 MB\nИдентификатор компьютера\n11724403\nПриостановлен вручную\nнет\nНе запрашивать задания\nнет\nРазмещение компьютера\nпо умолчанию\nЗавершённых успешно заданий\n0\nЗавершённых неудачно заданий\n0\nОчки\nУчастник\n3.020.308 всего, 1.975,57 в среднем\nКомпьютер (хост)\n57.125 всего, 56,66 в среднем\nПланировщик\nПриоритет планировщика\n-2,12\nПоправочный коэффициент продолжительности\n1,7690\nПоследний ответ планировщика\nСуб 30 Сен 2017 22:32:31\n"
The text that cannot be copied (also it brokes the ability to copy the text above):
$8 = L"\nВыделено ресурсов\n100\nИспользование диска\n8,45 MB\n"
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
Maye this is even unrelated to wxHtmlWindow. If it is and it can be reproduced easily in one of the samples (with small modifications), please open a bug report at: http://trac.wxwidgets.org/
Use the source, Luke!
- AenBleidd
- Earned a small fee
- Posts: 10
- Joined: Mon Oct 02, 2017 1:51 am
- Location: Friedrichshafen, Germany
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
Sorry for long delay.
Here's the modified Hello World app with the behavior mentioned before:
https://github.com/AenBleidd/wx-issue-test
Here's the modified Hello World app with the behavior mentioned before:
https://github.com/AenBleidd/wx-issue-test
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
Did you check if wxHtmlWindow really plays a role in this issue? What if you use hardcoded values for the strings you usually get from html->SelectionToText() and html->ToText() ?
Use the source, Luke!
- AenBleidd
- Earned a small fee
- Posts: 10
- Joined: Mon Oct 02, 2017 1:51 am
- Location: Friedrichshafen, Germany
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
I checked. If I set needed text directly it works until 'm_txtInformation->SelectionToText()' is called.
I do not know what's happening but if I didn't call this all works OK.
Once I call this function nothing works.
What additional information should I provide to get help?
Could you please also report this?
For some reasons I can't create an account there: verification email is not sent.
Thanks
I do not know what's happening but if I didn't call this all works OK.
Once I call this function nothing works.
What additional information should I provide to get help?
Could you please also report this?
For some reasons I can't create an account there: verification email is not sent.
Thanks
Re: wxHtmlWindow::SelectionToText doesn't copied to clipboard using wxTheClipboard
I had the same problem with the registration. I used the resend verification mail option a day later, then I received the verification mail.AenBleidd wrote: Could you please also report this?
For some reasons I can't create an account there: verification email is not sent.