[MonoDevelop] Designer Problems
Ian Norton
ian.norton-badrul at thales-esecurity.com
Tue Sep 13 10:34:42 EDT 2011
On Tue, Sep 13, 2011 at 03:00:01PM +0100, Bradley M. Small wrote:
> Subject:
>
> I am not sure the policy on answering your own posts, but since no one was able to answer this, I figure I will reply with a solution that worked for me in case anyone else runs into this problem.
>
> What appears to have happened, and I am not sure why, is that multiple entries for the same named object were in the .GUI file. What would happen was that the UI for the designer would make modifications and update one of the two copies but not the other. In addition to this, when the compilation took place it would process one of the two and not the other, and in many instances these were not the same ones. Result... changes would take place that would update what was shown in the development tool, those changes, however were not compiled into the executable.
>
> How this duplication happens is left as an exercise for anyone interested in fixing it, but I have not been able to reproduce the problem again, not that I am trying really hard
>
> I opened the stetic.gui file in a text editor. I then separated each widget node into separate buffers. Node is probably a bad term to use, but I took the whole hive that pertained to 'MainWindow' for example and put that in one buffer, then I took the hive that went with "ValueSettingDialog" into another, and so on. What I found was three buffers with stuff for 'MainWindow'. I simply took the one that had the most stuff in it and put it back into position in stetic.gui. Once reassembled with exactly one set of XML for each widget ... the designer started to work again. As well, the compiled executable also worked.
>
> This raised a few questions in my mind. Wouldn't it make more sense to have one stetic.gui file for each widget? As it is there is one hidden .CS file for each one which makes sense, but if I wanted to do some cut and paste code reuse, I could easily move the hidden .CS file, but would have to break apart the stetic.gui file. Is there a design philosophy that I am missing (was not able to find any documentation on this) that mandates the stetic.gui to be monolithic to a project? Doesn't this cause all the hidden files to have to be remade whenever you make a change to just 1 of them?
>
> I had designed a complex window in my MainWindow widget. Later, I decided that I wanted to have multiple window instances that are all the same, so I manually cut and pasted in the stetic.gui file to create the GameWindow. Seems like this would be better handled if there were more granularity in the files. This is just an observation.
Well done, I have seen this happen to my a number of times when sharing source
between two different versions of MD on different computers.
One version was an unstable early beta of 2.6 and would occasionally crash when
using the designer, so I probably ended up with corrupt stetic files like the
ones you've seen.
Ian
More information about the Monodevelop-list
mailing list