Hey,<br><br>Thanks for the response. I do not think the code I use to reattch them is an issue, but I have attached it below. The reason I do not think its an issues is because if i comment out those lines I showed you last e-mail the program does not crash, it just piles widgets on top of each other. Also this code works just fine on Windows (all versions) and Linux (SUSE and Ubuntu) I use the "Native Version" of GTK on OSX 10.5 with Mono 1.9.1 that I installed 3 or so months ago. Do you have any ideas about a work around, another way to remove widgets from a table?<br>
<br> public override void LayoutPropertiesPanel()<br> {<br> if(showPropPanel)<br> {<br> <br> Table GTKTable = drawView.Controller.GTKObjectPropertiesTable;<br><br>
GTKTable.Attach(typeIndicator, 1, 4, 2, 5);<br> GTKTable.Attach(nameBox, 1, 4, 6, 8);<br><br> GTKTable.Attach(xLabel, 4, 6, 2, 5);<br> GTKTable.Attach(xBox, 4, 6, 6, 8);<br>
<br><br> GTKTable.Attach(yLabel, 6, 8, 2, 5);<br> GTKTable.Attach(yBox, 6, 8, 6, 8);<br><br> GTKTable.Attach(widthLabel, 4, 6, 9, 12);<br> GTKTable.Attach(widthBox, 4, 6, 12, 14);<br>
<br> GTKTable.Attach(heightLabel, 6, 8, 9, 12);<br> GTKTable.Attach(heightBox, 6, 8, 12, 14);<br><br> GTKTable.Attach(buttonModeCheckBox, 8, 12, 11, 15);<br><br> GTKTable.Attach(fillLabel, 8, 10, 2, 5);<br>
GTKTable.Attach(fillButton, 8, 10, 6, 8, AttachOptions.Fill, AttachOptions.Expand, 0, 0);<br><br> GTKTable.Attach(strokeLabel, 9, 13, 2, 5);<br> GTKTable.Attach(strokeButton, 10, 12, 6, 8, AttachOptions.Fill, AttachOptions.Expand, 0, 0);<br>
<br> GTKTable.Attach(strokeWidthLabel, 12, 15, 2, 5);<br> GTKTable.Attach(strokeComboBox, 12, 15, 6, 8, AttachOptions.Fill, AttachOptions.Expand, 0, 0);<br> if ( showEvents )<br>
{<br> GTKTable.Attach(eventsLabel, 15, 18, 2, 5);<br> GTKTable.Attach(eventsComboBox, 15, 18, 6, 8, AttachOptions.Fill, AttachOptions.Expand, 0, 0);<br><br> eventHandlerBox.BorderWidth = 1;<br>
GTKTable.Attach(eventHandlerBox, 18, 31, 2, 15);<br> eventHandlerBox.GdkWindow.Background = new Gdk.Color(0, 0, 0);<br> }<br><br> GTKTable.ShowAll();<br>
UpdatePropertiesPanel(); // sets all of the values of the widgets we just attached<br> }<br> }<br><br>Billy<br><br><div class="gmail_quote">On Sat, Jun 28, 2008 at 12:48 PM, Michael Hutchinson <<a href="mailto:m.j.hutchinson@gmail.com">m.j.hutchinson@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Sat, Jun 28, 2008 at 2:31 AM, Billy Schoenberg <<a href="mailto:wasbridge@gmail.com">wasbridge@gmail.com</a>> wrote:<br>
> Hi,<br>
> I am having a problem removing all of the widgets from a table. I use this<br>
> code<br>
><br>
> foreach ( Widget c in controller.GTKObjectPropertiesTable.Children)<br>
> {<br>
> controller.GTKObjectPropertiesTable.Remove(c);<br>
> }<br>
> to try to clear a table, but it gives this exception<br>
> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004><br>
> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff><br>
> at Gtk.Application.Run () <0x0000a><br>
> at Open_Dialect.MainWindow..ctor (string) [0x0070a] in<br>
> /Users/Billy/Desktop/Open Dialect/Open<br>
> Dialect/OpenDialect/FormsAndViews/MainWindow.cs:257<br>
> at Open_Dialect.Program.Main (string[]) [0x0005f] in<br>
> /Users/Billy/Desktop/Open Dialect/Open Dialect/OpenDialect/Program.cs:43<br>
> at (wrapper runtime-invoke)<br>
> Open_Dialect.Program.runtime_invoke_void_string[]<br>
> (object,intptr,intptr,intptr) <0xffffffff><br>
> yes that is the full stack trace, it is missing pieces and I do not know<br>
> why. The first time this piece of code is called it works fine, removes the<br>
<br>
</div>It an unmanaged segfault in the main loop. Something you've done<br>
leaves this in a state that doesn't immediately cause problems, but<br>
makes the main loop crash.<br>
<div class="Ih2E3d"><br>
> widgets from the table, but then after I reattach them and call this method<br>
<br>
</div>What's the code that you use to re-attach them?<br>
<div class="Ih2E3d"><br>
> again it throws this exception. Any ideas? Who to report to? I am having<br>
> a lot of trouble registering for the Bugzilla at Novell.<br>
<br>
</div>Have you seen <a href="http://www.mono-project.com/FAQ:_Novell_Bugzilla" target="_blank">http://www.mono-project.com/FAQ:_Novell_Bugzilla</a> ?<br>
<br>
Also, are you using the X11 or "native" version of GTK on OS X?<br>
<font color="#888888"><br>
--<br>
Michael Hutchinson<br>
<a href="http://mjhutchinson.com" target="_blank">http://mjhutchinson.com</a><br>
</font></blockquote></div><br>