Hey Rutger,
2013/6/13 Rutger ter Borg <rut...@terborg.net>
>
> Dear list,
>
> I'm in the process of setting up a Wt application, and I'm having
> trouble figuring out the relationship and/or object-ownership model of
> WStackedWidget, WMenu, and WMenuItems. I'm seeing WMenuItem deleting
> content widgets, of which it is not clear who is the owner, and only
> when they are not loaded. In particular, I'm confused by the destructor
> at line 104 of WMenuItem (Wt 3.3.0), which is the cause of a segfault:
>
> if (!contentsLoaded())
> delete contents_;
>
> Who owns the content stack? It's parent object, or WMenu, or?
>
It's parent object, since one contents stack can be shared accross several
WMenu's
> Who owns the contents? WStackedWidget, or WMenuItem, or?
>
WMenuItem.
> Who owns the menu items? WMenu, or?
>
WMenu.
> Why doesn't WMenu have a setContentsStack?
>
Why doesn't WMenuItem have a setContents?
>
I believe because it does not worth it.
Can you please explain why do we need these stuff?
What real example usage?
--
// Dmitriy.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest