Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does Object close
Message
 
To
12/04/2002 16:17:44
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00644531
Message ID:
00644858
Views:
15
>I sure do have a lot of questions and I sure am glad the universal thread exists so I can get answers. Thank you everyone. Now on to a new question. I create an instance of a class called MapPoint. I start a procedure in the class using a new thread (thanks to the response of an earlier thread). This procedure uses ole automation to open Microsoft MapPoint and plots some points on the map and then zooms in on the points. After doing all of this, out of nowhere MapPoint asks me if I want to save the map and then closes. Why I ask? I never told it to quit. I must also say that even if I don't do this by using a new thread it still happens. Does anyone have any suggestions? Thanks for the help.

Sounds like your object is going out of scope somewhere. If you use a thread to create the object the object will shut down when the thread is done. IOW, you need to deal with the fact that the UI is still active at that point and can't let the thread die until you really want to quit.

As pointed out by the previous message the best thing to do likely is to put the object as a property of the form/bus object or whatever else is persistent while the UI is up and use the thread code to manipulate that object instance rather than using a local var.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform