Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem creating Handle
Message
From
17/05/2005 17:17:56
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01014711
Message ID:
01015104
Views:
20
Mike,

Well, I was wrong about it being a Combo. It's hard to debug when you have to know which event is firing in order to set a breakpoint on it (or on any methods it might call).

I thought I had set breakpoints on all the possible events, but as it turns out, I didn't. The only thing wrong with my UserControl was that it wasn't checking whether a few things were null prior to using them. Normally, those things would not have been null when that method was called (it was a custom Rebind() method). Even when the UserControl was not data-bound I hadn't had the problem before. What caused it to be called prematurely on this particular Form was a SelectedIndexChanged event on a ListView on another control on the form ... that SelectedIndexChanged event handler executes an Unbind and Rebind method on it's container (it's parent) ... which basically does it for all control on the form that implement a custom binding Interface. My forms that were working correctly didn't happen to call the Rebind() method and so they worked fine.

Would have been nice to have had a "null reference" exception instead of a "error creating window handle" error, but oh well.

~~Bonnie


>I've also seen the same error, and it might be the same thing, when I'm binding to a DataView that doesn't exist (this is Mere Mortals specific). So when I do mmDataSet.GetDataView("MyDatView") and I misssppelled "MyDataView", same thing.
>
>Don't know if that applies. Hope you figure it out. My stack trace was pretty cryptic, but seemed to point to data binding.
>
>Mike
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform