Thanks, Bruce. I actually had a reference problem a few weeks ago but this
time it was not that. About half an hour after posting and after talking
with a friend of mine, I discovered the culprit. I had sort of outsmarted
myself. I have built some pretty extensived automated update code that keeps
a form in sync with the data model. I call it "ASM". I didn't think this
was the cause because I was stepping through the code in question and it
wasn't showing me the execution of any ASM code.
But lo and behold it was firing! I still don't know why the debugger
doesn't show it normally but once I added a few breakpoints in the ASM code I
saw it was so.
So the solution was to temporarily disable this code, do the necessary
visual updates, and then reactivate the code.
Sorry to trouble you [all] but I was completely stymied ... and have learned
something new about the debugger!
Thank you again for your help.
--
Robert W.
Vancouver, BC
www.mwtech.com [quoted text, click to view] "Bruce Wood" wrote:
> First, you need to post the relevant code.
>
> As a blind stab at a solution, I would ask whether it's not a reference
> problem. To explain what I mean, here's an example:
>
> Choice temp = new Choice("A");
> questions[0].Choices.Add(temp);
> temp = new Choice("B");
> questions[0].Choices.Add(temp);
> Choice temp2 = new Choice("C");
> questions[0].Choices.Add(temp2);
> temp2 = new Choice("D");
> questions[0].Choices.Add(temp2);
>
> .... now for the kicker ...
>
> temp.ChoiceLetter = "A"; // or something like that
>
> .... Hey! The "B" in the list changed to "A"! Of course, because I was
> still holding a reference to the object I created and I modified it,
> since the reference in the list points to the same object, it changed
> "too" (it didn't change "too": there's only one of them).
>
> Could it be something like that?
>
> Anyway, you need to post the code. :-)
>