If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Previous posts broken so again: "has disconnected from its clients"

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-15-04, 20:53
danko danko is offline
Registered User
 
Join Date: Dec 2003
Location: Varna
Posts: 20
Exclamation Previous posts broken so again: "has disconnected from its clients"

Run-time error 2147417848:
Automation error
The object invoked has disconnected from its clients.

If this error message bothers you too, I've got something that may help. I succeeded to analyse two code fragments that constatntly produced this error.
The code fragment handled these two events: "DropButtonClick" and "MouseDown" of a combo box. On both fragments I was trying to pass the "Focus" to another control located in other "Frame" component.
When I commented out then piece where the "focus" was passed, I found that these events fire twice. It occurs that the first time the event was fired, code sends "focus" to unother control that resides in unother container. When the second event occurs, the event handling routine somehow has no background ("has disconnected from its clients").
I worked around the problem when I moved the code to be fired with the "KeyDown" event.
That "double fire" might be problem that concerns several events in several controls from different libraries.


So look around in your source for fast shooters and cool them down =)

Hope been of use. If you find some details I'll be glad to have your reply.

All the best !
------------------------------------------------------------------------------------------------------
Hi again!

I've acquired additional experience. The thing I design currently is a multifunctional form, that changes face and functionality as the user interacts with it. For that reason I often enable and disable different controls, and pass the "focus" between them. In this context I had that situation:
After the last mouse click the form stopped responding to messages. I put breakpoints to all possible message handlers but none worked. Message respond had restored after I switched applications wit Alt-TAB keys.
After some thinking and looking I foud this: There was code fragment where the current control was disabled and the focus was transferred to the next control. That code fragment resided in "MouseDown" hadling procedure.
It appeared that after the "focus" had jumped to the second control and the first had been disabled a "MouseUp" event occured, that waited for the first control to be handled. That event had prevented all other incoming messages from being handled. It effectively had blocked the message buffer. The switching between applications had cleared the buffer and unblocked the message handling.
After I moved my code in "MouseUp" event handler the problem stopped.

So the moral is: If you had to disable a control you must be sure that there are no incoming messages for that control for else you'll face ghostly troubles.

All the best and Neet and Tidy Sourcing :-)
__________________
Prob Solver
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On