OnViewClosed on one Presenter called multiple times during application shutdown?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OnViewClosed on one Presenter called multiple times during application shutdown?

Jerome Chan
I'm using onViewClosed to save the position of a window but somehow I'm
getting some weird behaviour.

While running the Shell under the image, onViewClosed gets called once
when I close the View. When I deploy it as a To Go Application, the
onViewClosed method is called 3 times (I put a MessageBox up, 3 of them
appeared).

Am I doing something wrong?


Reply | Threaded
Open this post in threaded view
|

Re: OnViewClosed on one Presenter called multiple times during application shutdown?

Blair McGlashan
"Jerome Chan" <[hidden email]> wrote in message
news:[hidden email]...
> I'm using onViewClosed to save the position of a window but somehow I'm
> getting some weird behaviour.
>
> While running the Shell under the image, onViewClosed gets called once
> when I close the View. When I deploy it as a To Go Application, the
> onViewClosed method is called 3 times (I put a MessageBox up, 3 of them
> appeared).
>
> Am I doing something wrong?

Yes. If you put up a message box in #onViewClosed you must make it
#taskModal (look for references to that for examples).

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: OnViewClosed on one Presenter called multiple times during application shutdown?

Jerome Chan
In article <ak6beo$1geh1o$[hidden email]>,
 "Blair McGlashan" <[hidden email]> wrote:

> "Jerome Chan" <[hidden email]> wrote in message
> news:[hidden email]...
> > I'm using onViewClosed to save the position of a window but somehow I'm
> > getting some weird behaviour.
> >
> > While running the Shell under the image, onViewClosed gets called once
> > when I close the View. When I deploy it as a To Go Application, the
> > onViewClosed method is called 3 times (I put a MessageBox up, 3 of them
> > appeared).
> >
> > Am I doing something wrong?
>
> Yes. If you put up a message box in #onViewClosed you must make it
> #taskModal (look for references to that for examples).
>
> Regards
>
> Blair
>
>
>
>

I made it task modal and I still have 2 Message boxes appearing, one
after another.