Hey, I thought about the Destroy, make new, but I have run into a problem there, Destroy and Dispose both delete all of the Widgets packed inside of them, is there anyway to toss out the table but not the widgets packed inside? <br>
<br>BIlly<br><br><div class="gmail_quote">On Sat, Jun 28, 2008 at 3:23 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 1:52 PM, Billy Schoenberg <<a href="mailto:wasbridge@gmail.com">wasbridge@gmail.com</a>> wrote:<br>
> Hey,<br>
><br>
> Thanks for the response. I do not think the code I use to reattch them is an<br>
> issue, but I have attached it below. The reason I do not think its an<br>
> issues is because if i comment out those lines I showed you last e-mail the<br>
> program does not crash, it just piles widgets on top of each other. Also<br>
> this code works just fine on Windows (all versions) and Linux (SUSE and<br>
> Ubuntu) I use the "Native Version" of GTK on OSX 10.5 with Mono 1.9.1 that I<br>
<br>
</div>Ah. Yeah, that's the followup I was going to ask. If it works fine on<br>
linux and windows, the OS X "native" GTK port is probably to blame.<br>
It's nowhere near as mature as the other GTK ports.<br>
<br>
You could use the X11 version of GTK on OS X for now, though it's less<br>
convenient to install, as it requires X11.<br>
<div class="Ih2E3d"><br>
> installed 3 or so months ago. Do you have any ideas about a work around,<br>
> another way to remove widgets from a table?<br>
<br>
</div>Firstly, it's bad in a "foreach" to modify the collection over which<br>
you're iterating, since the enumerator object usually becomes invalid<br>
(in fact, most of the .NET collections will throw exceptions if you<br>
try this). Try this:<br>
<br>
while (controller.GTKObjectPropertiesTable.Children.Count > 0)<br>
controller.GTKObjectPropertiesTable.Remove(controller.GTKObjectPropertiesTable.Children[0]);<br>
<br>
A workaround could be to do<br>
<br>
controller.GTKObjectPropertiesTable.Visible = false;<br>
<br>
or since you're clearing the entire table, just Destroy() it and<br>
create a new one.<br>
<br>
Also, doesn't keeping a widget on your controller violate MVC? :)<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="Wj3C7c">Michael Hutchinson<br>
<a href="http://mjhutchinson.com" target="_blank">http://mjhutchinson.com</a><br>
</div></div></blockquote></div><br>