Doug, even though the object may be "internal" as you say, it may have come and gone already by the time you're accessing it. there may be no window there to get a handle from; or the accessible object may be gone. this is why GW added the static versions of some object types, to prevent this from happening to you.
I think it's best just to bail out when it happens to you. Chip -----Original Message----- From: Doug Lee [mailto:[email protected]] Sent: Thursday, February 17, 2011 8:32 PM To: [email protected] Subject: Re: Best way to handle "Object is not connected to server" errors? Actually, my question is whether the errors are caused by accessing the Dictionary object or by accessing its content. My errors came from accessing WE object model objects. If your dictionary values are also WE objects, the cause could be the same I think. But if you are actually getting errors on lines like dim nInt : nInt = oDict("fifthInteger") then the problem may not really have to do with Window-Eyes at all. It can't be a cross-process communication issue though, I don't think, because Window objects are internal, and one of my errors came from accessing the Handle property of a Window object from an internally hosted vbs file. On Thu, Feb 17, 2011 at 06:24:11PM -0700, Jeff Bishop wrote: These are generally Windows Scripting Host dictionary objects. GW Micro moved the dictionary object inside of WE to make life faster so I hope this resolves that issue. I have never seen the error other than those cases. -----Original Message----- From: Doug Lee [mailto:[email protected]] Sent: Thursday, February 17, 2011 5:17 PM To: [email protected] Subject: Re: Best way to handle "Object is not connected to server" errors? Wow! Do you mean you get an error of this type when trying to look up a key in a Dictionary? Is the key a Window-Eyes object model object of some sort, or can it be something simpler, like a string? On Thu, Feb 17, 2011 at 04:59:00PM -0700, Jeff Bishop wrote: Doug, This is a great question. Most of my issues with this have been when accessing dictionary objects so it is interesting that you are seeing it in other areas. -----Original Message----- From: Doug Lee [mailto:[email protected]] Sent: Thursday, February 17, 2011 4: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 -- 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
