Bug #3741
closedWPushButton + setMenu(WPopupMenu) + menu->addItem(tr("some-string"))
0%
Description
Guys,
First of all, I really would like to thank you for Wt C framework! Loving it! Every bit of it! I really hope my project will pull through and you and I can even talk more and hopefully even do more business! Again - THANK YOU SO MUCH for such an amazing and unique platform/SDK!!!
I discovered a little bug, and already built a workaround it. I hope you can use my report to fix this issue in the next release (I am using Wt 3.3.3-2 on Fedora 20). In the meantime - feel free to share the workaround.
If I create a WPushButton, and associate a WPopupMenu in which I addItem and initilize the item's text with WString::tr(), upon exit (logout) I get the error:
Wt internal error: TypeError: a is null, code: undefined, description: undefined
or sometimes:
Wt internal error: TypeError: b is null, code: undefined, description: undefined
Please note, that you have to click on the WPushButton to get the WPopupMenu displayed, if you want to recreate the Wt internal error. Otherwise, it won't display this error.
Workaround ¶
If I intilialize the WPopupmenu item this was menu~~addItem(tr("some-string").toUTF8()) instead of menu~~>addItem(tr("some-string")) no error is displayed.
It possible that I have an issue/bug in my code, but I was able to replicate this error in another project.
Thank you!
Here is a sample code that will prodice this error:
WPushButton* btnDropDown = new WPushButton(root());
WPopupMenu* pmDropDown = new WPopupMenu();
pmDropDown->addItem(Wt::WString::tr("some-string"));
btnDropDown->setMenu( pmDropDown);
Files
Updated by Koen Deforche over 9 years ago
- Status changed from Feedback to InProgress
- Assignee changed from Koen Deforche to Benoit Daccache
- Target version changed from 3.3.2 to 3.3.4
Benoit can you create a test case for this?
Updated by Benoit Daccache over 9 years ago
- File testcase.patch testcase.patch added
I built a test case with the hello example and the Auth example.
I wasn't able to reproduce the problem in both cases.
Here is the patch for the hello example to test the problem.
Your sample code doesn't help reproducing the problem, Could you provide a full test case that fails ?
Regards,
Benoit
Updated by Benoit Daccache over 9 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche about 9 years ago
- Status changed from Resolved to Closed
Updated by Koen Deforche about 9 years ago
- Target version changed from 3.3.4 to 3.3.5