[MonoDevelop] Improvement on the Glade# 2.0 auto generated app

Victor Rafael Rivarola Soerensen (FANATICO y LOCO por Cristo) vrrivaro at gmail.com
Fri Mar 3 22:48:13 EST 2006

Not having even the faintiest idea on where to make the editions on
SVN (and after I spent a good part of the day trying to figure it
out), I decided to send you the modified file instead of a patch.

Main.cs is the main file. It contains my proposed modifications like
they should appear in the built solution.

Tested.cs is the name of a slightly modified Main.cs that contains a test case.

Finally, gui.glade is the glade file that corresponds to the test case.

You could create a new Glade# 2.0 solution (it might work with Glade#
solution to, but I haven't tested it). Then, replace its Main.cs with
Tested.cs and its gui.glade with the one I provided (but save the
original), compile and run the solution. Click on the button, and an
ArithmeticException will be thrown (by "throw new
ArithmeticException();"). The program will then pop up a MessageBox
with the exception's type, its message and stack trace. Once the
dialog gets closed, the three pieces of data will be echoed on the
screen and thee app will terminate.

Just for fun, remove the OnButton1Clicked handler and see what happens.

Now, replace Main.cs with the one I provided, and the gui.glade with
your saved copy and you are ready to start coding your own app. Now,
every unhandled exception will pop up a dialog box on the screen just
before terminating the app. Very handy, specially if you started the
app by clicking on a menu or desktop icon. No more apps that
misteriously disappear from your screen! At least, you get an error
message now.

Please tell me if you like it, I can then modify the other project
types so they will behave like this. If you do like it, please tell me
where the templates are on SVN. I would love to hear how my error
message could be improved.

Jesus bless you,

Víctor Rivarola

"Por cuanto eres tibio, y no frío ni caliente, te vomitaré de mi boca."
Apocalipsis 3:16

"Porque la Palabra de la Cruz es locura para los que se pierden; pero a
los que se salvan, esto es, a nosotros, es poder de Dios."
1 Corintios 1:18
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.cs
Type: text/x-csharp
Size: 1353 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20060304/3eefd349/Main.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Tested.cs
Type: text/x-csharp
Size: 1456 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20060304/3eefd349/Tested.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gui.glade
Type: application/x-glade
Size: 1637 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20060304/3eefd349/gui.bin

More information about the Monodevelop-list mailing list