Author Topic: wxSmith bug: can't apply param?  (Read 5172 times)

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
wxSmith bug: can't apply param?
« on: February 05, 2009, 08:07:25 am »
Is wxSmith bug?


[attachment deleted by admin]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith bug: can't apply param?
« Reply #1 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.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: wxSmith bug: can't apply param?
« Reply #2 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;
}

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith bug: can't apply param?
« Reply #3 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.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith bug: can't apply param?
« Reply #4 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