What continues to baffle me, then, is how the object could have gone out of scope. I can't yet vouch for the Window object case because that one came from a third-party (client) error report. The one that happened to me personally this week was an Accessible for a field that was still on screen as far as I know. I guess maybe a focus event got fired for a transient window.
I'll implement a bail-out for the customer's Window object situation then. I'm thinking, in general, that we might want a way to disable pop-up error messages entirely for some situations. For instance, in a call center, a non-answer might be better than a pop-up error box in the middle of a live call. On Thu, Feb 17, 2011 at 08:35:03PM -0500, Chip Orange wrote: Doug, according to sources on the internet: "This one is pretty straight forward. You get this when you try to use a COM object after you have called CoUninitialize():" Which means I'm pretty sure the object you are dereferencing is no longer valid; I think in a dictionary situation, it means the dictionary object has gone out of scope or been cleared. I don't think requeueing the request will help. Chip -----Original Message----- From: Doug Lee [mailto:[email protected]] Sent: Thursday, February 17, 2011 6:42 PM To: [email protected] Subject: Best way to handle "Object is not connected to server" errors? I have seen this error in two projects this week. In one, it was fired by me trying to access properties of an Accessible object I saved in a class from an OnObjectFocus event. In the other, it was fired by trying to get .Handle from a Window object that was a global var populated by an OnObjectFocus event (set globalVar = accObj.Window). The error is random, meaning it may happen one in twenty or less times a person does the same thing. In the first project, I just abort the operation. In the second, I don't yet know if I should do that or queue a repeat of that operation. Does this error mean the saved object is temporarily bereft of its properties somehow, or that it will never get them back until it is set again? -- Doug Lee, Senior Accessibility Programmer SSB BART Group - Accessibility-on-Demand mailto:[email protected] http://www.ssbbartgroup.com "While they were saying among themselves it cannot be done, it was done." --Helen Keller -- Doug Lee, Senior Accessibility Programmer SSB BART Group - Accessibility-on-Demand mailto:[email protected] http://www.ssbbartgroup.com "While they were saying among themselves it cannot be done, it was done." --Helen Keller
