Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Loaden on February 05, 2009, 08:07:25 am

Title: wxSmith bug: can't apply param?
Post by: Loaden on February 05, 2009, 08:07:25 am
Is wxSmith bug?


[attachment deleted by admin]
Title: Re: wxSmith bug: can't apply param?
Post by: Jenna on February 05, 2009, 10:00:13 am
Is wxSmith bug?


No.

Code
Create
is inherited from
Code
wxFrame
(parent-class).

Quote
wxFrame::Create
bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame")

Used in two-step frame construction. See wxFrame::wxFrame for further details.
Quote from wxWidgets-documentation.
Title: Re: wxSmith bug: can't apply param?
Post by: Loaden on February 05, 2009, 10:38:31 am
But have a question: why to set this option ? how to use? it's can't work!
like this code:
Code
bool _App::OnInit()
{
    NewFrame* frame = new NewFrame(0L, wxID_ANY, wxPoint(50, 30), wxSize(700, 500), 0);
    frame->SetIcon(wxICON(aaaa)); // To Set App Icon
    frame->Show();

    return true;
}
Title: Re: wxSmith bug: can't apply param?
Post by: Jenna on February 05, 2009, 10:58:22 am
But have a question: why to set this option ? how to use? it's can't work!
like this code:
Code
bool _App::OnInit()
{
    NewFrame* frame = new NewFrame(0L, wxID_ANY, wxPoint(50, 30), wxSize(700, 500), 0);
    frame->SetIcon(wxICON(aaaa)); // To Set App Icon
    frame->Show();

    return true;
}

You are partly right.
In wxSmith you have to check "Use xxx from argument", otherwise default values should be used.

That seems to work correctly for parent and id, but not for position and size.
Title: Re: wxSmith bug: can't apply param?
Post by: byo on February 05, 2009, 11:37:54 pm
There's some bug in wxSmith I haven't invcestigated so far which causes the "Use xxx from argument" options to be overwritten somehow.  Sorry for the inconvenience. I''l try ti fix this asap.

Regards
   BYO