WX-DevCPP Bug -- Menu Designer.

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
Dandel1984
Knows some wx things
Knows some wx things
Posts: 40
Joined: Wed Jun 01, 2005 3:52 am

WX-DevCPP Bug -- Menu Designer.

Post by Dandel1984 »

i noticed an issue with making menus and submenus with the designer... it produces unusable code... please look at the code produced, which is just below...

Code: Select all

    /* this is the menu structure for a sample menu... and it errors..
    Core Menu1
    Core Menu2
    Core Menu3
    + Menu Item 1
    + Menu item 2
    - + Sub Menu item 1
    - + Sub Menu item 2
    - - + Sub Sub MEnu Item 1
    - - + Sub Sub MEnu Item 1
    */

void RPG_SuiteFrm::CreateGUIControls(void)
{
    //Do not add custom Code here
    //wx-devcpp designer will remove them.
    //Add the custom code before or after the Blocks
    ////GUI Items Creation Start
	WxMenuBar1 =  new wxMenuBar( );
	wxMenu *ID_MNU_Core_Menu1_Mnu_Obj = new wxMenu(0);
	WxMenuBar1->Append(ID_MNU_Core_Menu1_Mnu_Obj,_("Core Menu1"));
	
	wxMenu *ID_MNU_Core_Menu2_Mnu_Obj = new wxMenu(0);
	WxMenuBar1->Append(ID_MNU_Core_Menu2_Mnu_Obj,_("Core Menu2"));
	
	wxMenu *ID_MNU_Core_Menu3_Mnu_Obj = new wxMenu(0);
	WxMenuBar1->Append(ID_MNU_Core_Menu3_Mnu_Obj,_("Core Menu3"));
	
	ID_MNU_Core_Menu3_Mnu_Obj->Append(ID_MNU_Menu_Item_1,_("Menu Item 1"),_(""), wxITEM_NORMAL);
	

	ID_MNU_Menu_Item_2_Mnu_Obj->Append(ID_MNU_SubMenu_Item1,_("Sub Menu Item 1"),_(""), wxITEM_NORMAL); // undeclared object, ID_MNU_Menu_Item_2_Mnu_Obj


	ID_MNU_SubMenu_Item2_Mnu_Obj->Append(ID_MNU_SubSubMenu1,_("sub sub menu item 1"),_(""), wxITEM_NORMAL);// undeclared object, ID_MNU_Menu_Item_2_Mnu_Obj
	ID_MNU_SubMenu_Item2_Mnu_Obj->Check(ID_MNU_SubSubMenu1,true);

	ID_MNU_SubMenu_Item2_Mnu_Obj->Append(ID_MNU_SubSubMenu2,_("sub sub menu item 2"),_(""), wxITEM_NORMAL);
	ID_MNU_SubMenu_Item2_Mnu_Obj->Enable(ID_MNU_SubSubMenu2,false);

	ID_MNU_Menu_Item_2_Mnu_Obj->Append(ID_MNU_SubMenu_Item2,_("Sub Menu Item 2") , ID_MNU_SubMenu_Item2_obj); // undeclared object, ID_MNU_Menu_Item_2_Mnu_Obj
	ID_MNU_Core_Menu3_Mnu_Obj->Append(ID_MNU_Menu_Item_2,_("Menu Item 2") , ID_MNU_Menu_Item_2_obj);          // undeclared object, ID_MNU_Menu_Item_2_obj

	this->SetMenuBar(WxMenuBar1);

	this->SetStatusBar(WxStatusBar1);
	this->SetSize(0,0,602,200);
	this->SetTitle(_("RPG_Suite"));
	this->Center();
	this->SetIcon(wxNullIcon);
	
    ////GUI Items Creation End
}
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

This is a known bug that has been fixed in CVS. You can try the latest alpha code if you need the functionality.

-Tony
Everybody's got something to hide except for me and my monkey.
Vixus
Knows some wx things
Knows some wx things
Posts: 45
Joined: Sun Mar 13, 2005 12:41 pm

Post by Vixus »

We also need the ability to re-order menu items! :D
Dandel1984
Knows some wx things
Knows some wx things
Posts: 40
Joined: Wed Jun 01, 2005 3:52 am

Post by Dandel1984 »

nice hear that this bug is fixed, but i keep getting bugs where the application requires me to submit bug reports.


now for a few more questions i have.
1: Where's the real time preview of the menu bar?
2: why does the notebook view not work on frames?
3: multiple frames can't be done
4: dialogues don't have much available


and what's up with the WX widgets and such after i update the application values? i keep having troubles compiling after updating to version 2.6.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

now for a few more questions i have.
1: Where's the real time preview of the menu bar?
2: why does the notebook view not work on frames?
3: multiple frames can't be done
4: dialogues don't have much available
Go ahead and add these to the bug tracker/feature requests page.

https://sourceforge.net/tracker/?group_ ... tid=611982

Make sure you add some more descriptions of what's wrong. For example, I don't know what you mean by "dialogues don't have much available". What don't they have? What's missing?

Realtime preview of the menu bar would be nice. We should probably give it a try. Re-ordered is missing (good catch Vixus). Please add these to feature requests and we'll pu them in the queue.

The better you can describe the problem/feature you want, the better (and faster) we can get it built.

-Tony
Everybody's got something to hide except for me and my monkey.
Vixus
Knows some wx things
Knows some wx things
Posts: 45
Joined: Sun Mar 13, 2005 12:41 pm

Post by Vixus »

Will do.
Dandel1984
Knows some wx things
Knows some wx things
Posts: 40
Joined: Wed Jun 01, 2005 3:52 am

Post by Dandel1984 »

tbreina wrote:
now for a few more questions i have.
1: Where's the real time preview of the menu bar?
2: why does the notebook view not work on frames?
3: multiple frames can't be done
4: dialogues don't have much available
Go ahead and add these to the bug tracker/feature requests page.

https://sourceforge.net/tracker/?group_ ... tid=611982

Make sure you add some more descriptions of what's wrong. For example, I don't know what you mean by "dialogues don't have much available". What don't they have? What's missing?

Realtime preview of the menu bar would be nice. We should probably give it a try. Re-ordered is missing (good catch Vixus). Please add these to feature requests and we'll pu them in the queue.

The better you can describe the problem/feature you want, the better (and faster) we can get it built.

-Tony
oh sorry about that.... what i mean by the text, "dialogues don't have much available" is that the code generated doesn't include the interfacing with the GUI events... how can i tell what does what and how to access it? ... the event table doesn't really exist... can you make so that the table is filled automatically for people just learning wx widgets... i just found a sample here, and that helps me a lot:

http://www.bzzt.net/~wxwidgets/icpp_wx3.html
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL »

Dandel1984 wrote:how can i tell what does what and how to access it? ... the event table doesn't really exist... can you make so that the table is filled automatically for people just learning wx widgets...
You have tried ading events to your components, haven't you?

Lets say you have a button on your dialog, select the button, then on the property editor select the Events tab. You are presented with two options "OnClick" and "OnUpdateUI". Click on the gray area to the right of (e.g.) OnClick, you should be presented with a drop down list. You can then choose to either add a new function or select a pre-existing function.

Once you create a new function or select a pre-existing one, the event table is created to reflect this.

Code: Select all

//----------------------------------------------------------------------------
// Untitled1Dlg
//----------------------------------------------------------------------------
     //Add Custom Events only in the appropriate Block.
    // Code added in  other places will be removed by wx-dvcpp 
    ////Event Table Start
BEGIN_EVENT_TABLE(Untitled1Dlg,wxDialog)
	////Manual Code Start
	////Manual Code End
	
	EVT_CLOSE(Untitled1Dlg::Untitled1DlgClose)
	EVT_BUTTON(ID_WXBUTTON1,Untitled1Dlg::WxButton1Click)
END_EVENT_TABLE()
    ////Event Table End
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
Post Reply