Couple of wxformbuilder bugs
BlitzMax Forums/Brucey's Modules/Couple of wxformbuilder bugs
| ||
just a few small ones. 1.wxcodegen doesnt compile with framework FIX: change Framework wx.wxapp to Import Wx.wxapp 2.If you create a project with spaces in the variables the blitzmax project throws errors FIX: fill variable name spaces with underscores. 3.Import wx.wxapp is missing from the top of the generated blitzmax code. 4.Generated blitzmax code doesnt include app.run() stuff other than the bugs GOOD JOB! |
| ||
For 1, Works fine here, so not sure what's happening there, what's the error message? I'm not sure if 2 is really a bug, maybe it should automatically replace spaces with underscores for the lazy :) For 3 and 4, that is correct. The generated code should be imported into the application you're working on, so there's no need to have wxapp or app.run there. The idea is that the code it generates is left alone (you just extend the types it creates), so if you make changes to the gui with wxformbuilder you can just re-generate the code. |
| ||
I think there's a lack of documentation, which doesn't help those trying it out for the first time... 1, 3 and 4 are related. As Pete says, it is intended that the generated code be imported. Have a look at the "Application Code" tab in wxCodeGen. This is a suggested base framework from which you might work from, and includes the basics required to use the generated code - it imports the generated file, as well, as an example implementation of the Types generated as part of the project. You can copy and paste the code from that page into a new app, and it should build. This is what an example might look like : ' ' Example application stub generated by wxCodeGen v1.19 : 11 Sep 2009 18:22:38 ' SuperStrict Framework wx.wxApp Import "test_controls.bmx" New MyApp.run() Type MyApp Extends wxApp Method OnInit:Int() ' Add frame creation code here Return True End Method End Type Type MyDialog1 Extends MyDialog1Base Method OnInit() Super.OnInit() ' Add own initialisation code here End Method Method OnChar(event:wxKeyEvent) ' TODO : Implement me End Method Method OnRightDown(event:wxMouseEvent) ' TODO : Implement me End Method End Type Note that it also creates stubs for the event callbacks you define in the project. |
| ||
oh OK I get it now thanks, |