wxCommandLineParser lifetime

7 views
Skip to first unread message

mr cool

unread,
Nov 21, 2009, 9:59:44 AM11/21/09
to wx-dev
I notice that the framework creates a LOCAL wxCommandLineParser to
cope with command-line arguments in

bool wxAppConsoleBase::OnInit().

I think the Command Line Parser object should be a member of
wxAppConsoleBase because you may want to get things from it after the
call to OnInit(). It seems reasonable to me that it should always be
available.

mc

Vadim Zeitlin

unread,
Nov 22, 2009, 5:57:27 AM11/22/09
to wx-...@googlegroups.com
On Sat, 21 Nov 2009 06:59:44 -0800 (PST) mr cool <c94...@gmail.com> wrote:

mc> I notice that the framework creates a LOCAL wxCommandLineParser to
mc> cope with command-line arguments in
mc>
mc> bool wxAppConsoleBase::OnInit().
mc>
mc> I think the Command Line Parser object should be a member of
mc> wxAppConsoleBase because you may want to get things from it after the
mc> call to OnInit(). It seems reasonable to me that it should always be
mc> available.

The idea is that you extract any information from it in your overridden
OnCmdLineParsed(). It doesn't seem useful to keep the object which is only
used during program startup during the entire program execution.

Regards,
VZ

Reply all
Reply to author
Forward
0 new messages