Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi All,

Is there any thing similar to ISHELL_CancelTimer in BREW by which I can cancel the timer callbacks.

Actually the timer calls a callback and after completion the callback is again initialized.

I can cancel the timer but what about the already registered callbacks?

yeah thr is api ishellcancel timer to cancel the timer..
check iSHELL api w'll get it...

yeah thr is api ishellcancel timer to cancel the timer..
check iSHELL api w'll get it...

rishabh wrote:Hi All,
Is there any thing similar to ISHELL_CancelTimer in BREW by which I can cancel the timer callbacks.
Actually the timer calls a callback and after completion the callback is again initialized.
I can cancel the timer but what about the already registered callbacks?
If you register a callback by ISHELL_SetTimer; The call back will be called after time expires.
It is for sure that this call will be made only at once unless and until you again call ISHELL_SetTimer() for the same callback.
Check your callback function's body, you might have called ISHELL_SetTImer() again in it.
~~~~~~
SoftEast
~~~~~~

rishabh wrote:Hi All,
Is there any thing similar to ISHELL_CancelTimer in BREW by which I can cancel the timer callbacks.
Actually the timer calls a callback and after completion the callback is again initialized.
I can cancel the timer but what about the already registered callbacks?
If you register a callback by ISHELL_SetTimer; The call back will be called after time expires.
It is for sure that this call will be made only at once unless and until you again call ISHELL_SetTimer() for the same callback.
Check your callback function's body, you might have called ISHELL_SetTImer() again in it.
~~~~~~
SoftEast
~~~~~~

Hi Softeast,
Thanks for the prompt reply.
You are correct, I am calling ISHELL_SetTImer() again and that is required for my application and I have already mentioned it.
The question is how to cancel that callback/ or all the callbacks associated with a given applet.

Hi Softeast,
Thanks for the prompt reply.
You are correct, I am calling ISHELL_SetTImer() again and that is required for my application and I have already mentioned it.
The question is how to cancel that callback/ or all the callbacks associated with a given applet.

Hi RIshab,
If you want to cancell all the callbacks associated with the applet, then you must call
ISHELL_CancelTimer(m_pIShell, NULL,..);//
second param NULL specifies that all the callbacks must be canceled. If you want to cancel only specific call back then just pass it here.
Hope this suffices your query
~~~~~~
SoftEast
~~~~~~

Hi RIshab,
If you want to cancell all the callbacks associated with the applet, then you must call
ISHELL_CancelTimer(m_pIShell, NULL,..);//
second param NULL specifies that all the callbacks must be canceled. If you want to cancel only specific call back then just pass it here.
Hope this suffices your query
~~~~~~
SoftEast
~~~~~~

Hi Softeast,
Thanks for the prompt reply.
I think you didn't understood my question well.
I have already used ISHELL_CancelTimer with NULL, but its not working.
I need some method to cancel the callback which was registered by the timer.
Hope now I am clear.

Hi Softeast,
Thanks for the prompt reply.
I think you didn't understood my question well.
I have already used ISHELL_CancelTimer with NULL, but its not working.
I need some method to cancel the callback which was registered by the timer.
Hope now I am clear.

rishabh wrote:Hi Softeast,
I have already used ISHELL_CancelTimer with NULL, but its not working.
I need some method to cancel the callback which was registered by the timer.
Hope now I am clear.
ISHELL_CancelTimer should work for the callback cancellation. i dont know any other way to cancel a callback.
make sure the cancel callback statement is executed...
it should work.

rishabh wrote:Hi Softeast,
I have already used ISHELL_CancelTimer with NULL, but its not working.
I need some method to cancel the callback which was registered by the timer.
Hope now I am clear.
ISHELL_CancelTimer should work for the callback cancellation. i dont know any other way to cancel a callback.
make sure the cancel callback statement is executed...
it should work.

If i understood correctly u are seeting up a callback by callback_init to cancel u need to have callback_cancel, for timers if you use SetTimerEx and you do a Callback_Cancel the associated timer gets automatically dismissed

If i understood correctly u are seeting up a callback by callback_init to cancel u need to have callback_cancel, for timers if you use SetTimerEx and you do a Callback_Cancel the associated timer gets automatically dismissed

rishabh wrote:Hi Softeast,
Thanks for the prompt reply.
I think you didn't understood my question well.
I have already used ISHELL_CancelTimer with NULL, but its not working.
I need some method to cancel the callback which was registered by the timer.
Hope now I am clear.
Rishabh, recently I have faced same problem you were talking about...
Actually ISHELL_CancelTimer(..,NULL,pUserData),
should cancel all the timers..
but what happened in my case is if pUserData differs is different between ISHELL_SetTimer() calls and ISHELL_CancelTimer calls.
I observed that ISHELL_CacelTimer doesn't cancel all the timers but cancels only those timers which has same pUserData as passed in ISHELL_SetTimer.
Hope it will help..
~~~~~~
SoftEast
~~~~~~

rishabh wrote:Hi Softeast,
Thanks for the prompt reply.
I think you didn't understood my question well.
I have already used ISHELL_CancelTimer with NULL, but its not working.
I need some method to cancel the callback which was registered by the timer.
Hope now I am clear.
Rishabh, recently I have faced same problem you were talking about...
Actually ISHELL_CancelTimer(..,NULL,pUserData),
should cancel all the timers..
but what happened in my case is if pUserData differs is different between ISHELL_SetTimer() calls and ISHELL_CancelTimer calls.
I observed that ISHELL_CacelTimer doesn't cancel all the timers but cancels only those timers which has same pUserData as passed in ISHELL_SetTimer.
Hope it will help..
~~~~~~
SoftEast
~~~~~~

Hi Softeast,
This time you are correct, I got stuck up in a similar situation. Its recommended even in the API docs to use SetTimerEx in place of Ishell_settimer. Perhaps it worked for me. Cancelling every timer before setting again.

Hi Softeast,
This time you are correct, I got stuck up in a similar situation. Its recommended even in the API docs to use SetTimerEx in place of Ishell_settimer. Perhaps it worked for me. Cancelling every timer before setting again.