Bugfix in wxCodeGenBlitzMax Modules Forums/Brucey's Modules/Bugfix in wxCodeGen
| Hello, I created a dialog in wxFormBuilder that made wxCodeGen hang when generating the code due to wxBitmapButtons. The problem was in the "DoBitmap" method in code_gen.bmx because of an array index out of bounds. I just added a check for this and it seems to work ok now.  but may not be generating the code properly. I thought maybe it was trying to load bitmaps for unused things like onFocus, but maybe not. Anyway too late to check further now, will check tomorrow!|
| Ahh I think I know why, in the form builder I had set up a bitmap to show when selected, but then changed my mind and got rid of it but codegen still tried to load it even though it was just a blank string "". Looking at the fbd file there is "<property name="selected">; Load From File</property>" so it looks like the form builder doesn't properly clear it or something. |
| Ah, yes. Formbuilder has the habit of not emptying the property once you've set something and then unset it. Looks like I missed one :-)|
I think, if not bitmap, then it can probably just return "Null", which should get around it trying to load anything at runtime.