Bug #6224
closedWMenuItem bugged contents managment
0%
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.
Updated by Saif Rehman almost 7 years ago
Any comments, whether it's fixed or not?
Updated by Roel Standaert almost 7 years ago
Sorry, that was unclear. I believe this should be fixed in Wt 4.0.3.
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.
Updated by Saif Rehman almost 7 years ago
It could be a virtual function or a stl function container object, does that make sense?
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.