No, I am checking if PrgHandleEvent returns false, I call PrgUserCancel and
abort.
But I click on cancel many times and PrgHandleEvent never returns false, and
thus PrgUserCancel never get called.
Any idea why?
Can it be that the 1/2 second is too long (if the operation is quick) for
the system to get the event?
Manal

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Danny
Epstein
Sent: Wednesday, February 21, 2001 8:19 PM
To: Palm Developer Forum
Subject: Re: Progress Bar


Are you saying that PrgHandleEvent is never returning false? Or are you
expecting the system to call PrgUserCancel for you? It's your responsibility
to call PrgUserCancel when PrgHandleEvent returns false, and to actually
abort the operation when PrgUserCancel returns true.
--
Danny


"Manal Milad" <[EMAIL PROTECTED]> wrote in message
news:40475@palm-dev-forum...
> This is exactly what I am doing, but it seems that PrgUserCancel never
gets
> called. Any idea why?
> I check the return value of PrgHandleEvent to see if it was a cancel, but
> this never happens.
> Manal
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Danny
> Epstein
> Sent: Tuesday, February 20, 2001 8:16 PM
> To: Palm Developer Forum
> Subject: Re: Progress Bar
>
>
> "Manal Milad" <[EMAIL PROTECTED]> wrote in message
> news:40289@palm-dev-forum...
> > 1. Can I change in the progress bar dialog properties, like where on the
> > screen I want it to be drawn, ow can I make it smaller in size?
>
> I don't think so.
>
> > 2. There is a cancel button on the progress bar and my EvtGetEvent
checks
> > every 1/2 second EvtGetEvent (&event, 50), but when I click on Cancel,
it
> > seems that this event is never get caught and it is useless to cancel
and
> > the process completes till the end. Any idea why?
>
>
> You need to detect when the Progress Manager goes into "cancel mode" and
> abort the operation in progress, cleaning up as necessary. The Progress
> Manager doesn't know how to abort the process cleanly since it has no idea
> what the process is. See the macro PrgUserCancel. If PrgHandleEvent
returns
> false, you should call PrgUserCancel to check whether the user pressed the
> Cancel button. If he did, you should start the abort process. Depending on
> what the main process is, this can be complex or trivial. You should
update
> the progress dialog: your callback function should display an appropriate
> "Cancelling..." message while you're aborting.
> --
> Danny Epstein
> OS Engineer, Palm Inc.
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
>
>


--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to