Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
bugfix : need info on wxCombo
killerbot:
I am trying to fix the bug reported about the default code.
When you go to the editor settings, and you fill something in for c++ source, then you do the same for C++ header and then switch back to c++ source, the enteredt stuff is gone. This only happens the first time, so if you would fill in new stuff, then go back to header adn then back to source it would be OK.
I now where in the code things go wrong and I can adjust it there to make it work, though I think there's also another problem, related to wxCombo.
The combo can has 2 selections (source and header), apparently it starts up with 'source', when switching the 'header' the function OnChangeDefCodeFileType is called, which is what we want, BUT the very first time (remember this is where it goes wrong) this is called TWICE, all subsequent switches result in exactly ONE call, which seems the correct thing to do.
Does anyone know why there are 2 calls the first time ? Can the combo box be badly initialized, for example do we need to specify in the beginning which selection it should start out with, or does it default to the first one ??
My adjustement will fix the problem, but if that 2 calls would be just 2 call, then the bug is probably also fixed.
Lieven
killerbot:
Will still waiting on some input ;-) , there's another issue I have seen I'dd like to address.
When you are in the editor settings, should any change be applied before you hit the OK key ?
Since now for those default codes, changes get applied the moment you switch from one type to another, so even when you 'cancel' your way out, stuff has changed.
IMHO nothing should change before OK press, if others (mainly the devs) agree, I would create a patch for this too (well at least for the default code). Anyway normally I will post my patch for the first problem somewhere this morning, even if no feedback comes on that 'wxCombo' question.
Cheers,
Lieven
Michael:
--- Quote from: killerbot on January 26, 2006, 09:03:38 am ---Will still waiting on some input ;-)
--- End quote ---
I have tried with rev1866 and I have the same bug (as you said).
Michael
killerbot:
Well, I already have fixed the first part (will post explanation this evening), but I want to undeerstand why there were 2 OnChange... calls at the beginning, I think their should only be 1. But need the info from the devs here, my knowledge of wx is not that big. I think my fix is an improvement even when their would be only 1 OnChange..., since the code is now doing some stuff which is not needed I think. I know very abstract if I don't show you what I am talking about. Can't get to the source at this very moment. :-(
Michael:
--- Quote from: killerbot on January 26, 2006, 12:17:39 pm ---Well, I already have fixed the first part (will post explanation this evening)
--- End quote ---
Super. Thank you :).
--- Quote from: killerbot on January 26, 2006, 12:17:39 pm ---, but I want to undeerstand why there were 2 OnChange... calls at the beginning, I think their should only be 1. But need the info from the devs here, my knowledge of wx is not that big. I think my fix is an improvement even when their would be only 1 OnChange..., since the code is now doing some stuff which is not needed I think. I know very abstract if I don't show you what I am talking about. Can't get to the source at this very moment. :-(
--- End quote ---
It seems to me too that 2 calls are not needed, but better to have input from devs (as you said). May be this is needed for some kind of initialization. Anyway, if just one call was enough, your fix indeed improves the performance of C::B (a fact that it is always appreciate :D).
Michael
Navigation
[0] Message Index
[#] Next page
Go to full version