By Greg McGuffey - 8/15/2008
I have a user control that I've implemented IBusinessBindable on. It works great (or did until my last update). I'm now getting an error indicating an index is out of range. This is occuring in the SF BusinessLayer.RefreshValue() method, on the loBinding.ReadValue() call. This doesn't occur all the time. It only occurs in some specific situations:
Situation 1: when the BO goes into edit mode, when the user control has a value AND the tab (standard MS TabControl) containing the user control hasn't been visited. If I click on the tab before clicking on Edit, it works.
Situation 2: if I'm on an existing record were the user control has a value, then click on New. This is completely independent of any tab visiting I might have done.
Now, I'm sure I've broken something. The SF code and the .NET code haven't changed, but mine has. Unfortunately, there were a lot of changes before I noticed this. I don't see anything obvious in either the control, the form or the BO. I'm not sure were to even start looking. What could break ReadValue in this way?
Thanks!
|
By Trent L. Taylor - 8/18/2008
Hmmm....well....this could come from a number of different things. First of all, all of the binding of a BO will respect empty, new, and modified values. The bindings are automatically removed when an empty BO exists, etc. So as you mentioned, none of this has changed. So the first thing I would do would be to look at the implementation on the control in question and look at the call stack of the ReadValue to see where and how this is happening which may give you a clue. If you can't get it figured out, let me know. But this is a hard one to give you a straight answer on.
|
|