Project

General

Profile

Actions

Bug #6224

closed

WMenuItem bugged contents managment

Added by Saif Rehman about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Target version:
-
Start date:
02/04/2018
Due date:
% Done:

0%

Estimated time:

Description

There is a problem with Wt's menu item's content widget's management. 2 functions which failed to work properly are WMenuItem::contents() and WMenuItem::removeContents().

Using: WMenuItem contents with lazy load

Problem:

WMenuItem::contents(): returning null even though a contents widget was added to the menu item. Both oContents_ and uContents_ were null. I tried making sure oContents_ is set before uContents is moved to widget hierarchy but that caused the stack widget to show nothing at all.

WMenuItem::removeContents(): returning null and deleting the contents widget. The problem is evident from the line oContents*.reset() which appears before it is oContents* is accessed.

Actions #1

Updated by Roel Standaert almost 7 years ago

  • Status changed from New to Closed
Actions #2

Updated by Saif Rehman almost 7 years ago

Any comments, whether it's fixed or not?

Actions #3

Updated by Roel Standaert almost 7 years ago

Sorry, that was unclear. I believe this should be fixed in Wt 4.0.3.

Actions #4

Updated by Saif Rehman almost 7 years ago

Ok, can I suggest that there should be an added functionality: a function to lazily create the contents object on first attempt to open that menu item.

Actions #5

Updated by Saif Rehman almost 7 years ago

It could be a virtual function or a stl function container object, does that make sense?

Actions #6

Updated by Roel Standaert almost 7 years ago

Not sure, but if you want a feature, could you make a separate feature request for that? Thanks.

Actions

Also available in: Atom PDF