Difficult problem! Help!!

  • Thread starter Thread starter Tomer
  • Start date Start date
T

Tomer

Hi,

I've a method on a form/class that start a sequence of function calls. In
this sequence the form/class which contains the calling method that started
the whole sequence, is destroyed (this is possible because there is a static
object that stores the form/class).
When the whole sequence of method finishes its run its needs to return to
the calling method which started the whole thing.
But since the form/class doesn't exists, and exception is being thrown
(argument exception).


How can I solve this problem?

Tomer.
 
Post some code...

How does it "need to return to the calling method"? Calls back, event,
out/ref parameter, what?

Cheers
Daniel
 
How can you even expect to return control to an object that doesn't exist?
You need a new architecture.

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
You are totally correct!

I've tried using raising event/starting a thread, but this didn't work.
I thought may be using invoke to break the 'chain' so that the function that
started the sequence would finish before the rest of the code will get to
the point where it kills the form.

I'm sorry I couldn't post any code, its just to complex/big to give a small
sample.

Thanks for the help!


Tomer.
 
Back
Top