[MonoDevelop] Designer Problems

Bradley M. Small bradley_small at hotmail.com
Tue Sep 13 10:00:01 EDT 2011

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. 

Thanks again.

From: Bradley M. Small 
Sent: Friday, September 09, 2011 12:24 PM
To: monodevelop-list at lists.ximian.com 
Subject: [MonoDevelop] Designer Problems

Hello --

I have been using MonoDevelop for a little while, and in multiple versions from before 2.4 until 2.6 on both Ubuntu as well as 3 different versions of MS Windows. 

I have a project with a window that was made in the Designer (stetic?) It is not too complex but contains a few containers and some items. In addition to that, the project now has 2 more windows in it. 

What I have found, and I will happily accept blame for it if necessary, is that at some point, though it appears to work, the designer no longer effects changes. It will happily go through the motions of letting me modify or add widgets but, the code it no longer generates any more code in the hidden .cs file with the same name as the window. 

I have found that if I care to, I can hand modify the hidden file with the changes and they will take when I recompile. So in addition to not putting anything new or changing anything existing in the file, it does not overwrite changes I have manually added. 

1. Is there a way to regenerate the stetic.gui from a working .cs file?
2. Is there a way to regenerate the hidden .cs file from the gui.stetic file?
    a. I tried removing the files from that directory (except the gui.stetic) and recompiling. All it did was regenerate the very basics of the file, without even the Build() method included.
3. Is there an easy to get these things back into alignment using both files?
4. What can I do to avoid this going forward?
    a. I only tried to hand modify, or delete files after there was a problem. The only naughty things I did prior was to move the files from one machine to another recompiling in MonoDevelop or SharpDevelop in either Ubuntu or Window XP, Vista and/or 7.

Thanks for all the work on such a great tool


Monodevelop-list mailing list
Monodevelop-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20110913/9a22417f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 257 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20110913/9a22417f/attachment.gif 

More information about the Monodevelop-list mailing list