Message 1 of 6
.Net combobox and garbage collection
Not applicable
09-06-2008
04:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
i'm having trouble with my .net comboboxes. I use pieces of this code in a script i'm making. Essentially i want to use a .Net combobox on a .Net form. I do garbagecollection at the end here, but in my script it's put somewhere inside the script. So:
When i run this code once everything looks fine, when i run it twice i get an error dialog: "An unknown error occurred while MAXScript was performing garbage collection...". After that, just evaluation gc() will produce the same mesagebox. To get rid of this error i just have to restart max eventually. On my machine this behaviour is consistent. A button won't throw this error, just comboboxes. Can anyone confirm this? Better yet: does anyone have an idea to solve this?
greetings,
Klaas
i'm having trouble with my .net comboboxes. I use pieces of this code in a script i'm making. Essentially i want to use a .Net combobox on a .Net form. I do garbagecollection at the end here, but in my script it's put somewhere inside the script. So:
theForm = dotNetObject "form"
myComboBox = dotNetObject "comboBox"
theForm.Controls.Add myComboBox
theForm.Show()
gc()
When i run this code once everything looks fine, when i run it twice i get an error dialog: "An unknown error occurred while MAXScript was performing garbage collection...". After that, just evaluation gc() will produce the same mesagebox. To get rid of this error i just have to restart max eventually. On my machine this behaviour is consistent. A button won't throw this error, just comboboxes. Can anyone confirm this? Better yet: does anyone have an idea to solve this?
greetings,
Klaas