Project

General

Profile

Actions

Bug #3741

closed

WPushButton + setMenu(WPopupMenu) + menu->addItem(tr("some-string"))

Added by Anonymous almost 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Benoit Daccache
Target version:
Start date:
01/17/2015
Due date:
% Done:

0%

Estimated time:

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

testcase.patch (647 Bytes) testcase.patch Benoit Daccache, 03/10/2015 06:53 PM
Actions #1

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?

Actions #2

Updated by Benoit Daccache over 9 years ago

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

Actions #3

Updated by Benoit Daccache over 9 years ago

  • Status changed from InProgress to Resolved
Actions #4

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions #5

Updated by Koen Deforche about 9 years ago

  • Target version changed from 3.3.4 to 3.3.5
Actions

Also available in: Atom PDF