Help - Search - Members - Calendar
Full Version: Timer Is Not Working :(
Desktop Sidebar Forums > Customizations > Panel Development & Requests
murali
Hi

It seems that the timer component in my plugin is not working...i checked whether it is enabled, initialized and assigned event handler etc...but of no use...is there anything i need to do to notify the SB of the timer??

Thanks in advance

Murali
kdam
What do you mean by timer component? Your IPanel.Tick should be called every second. Have you try to use this method?
eitaneko
What is the return value of the tick function used for? Should it always be false?
yyy
Doesn't he talk about the Timer control? I'm not sure if this is the tick function. Anyway, he should put here all or some of his code so we'll know exactly what's the problem.
eitaneko
this is an old post. I didn't want to start a new one. do you know what the boolean return value of tick is used for?
Prism
Probably if it returns error then DS knows to mention it in its log, so the developer know where the problem comes from.
eitaneko
so do I manually return false if I am using the tick function?
GoMa
Yeah, just return false. Maybe it has to do something with the "minute" param. Dunno.
Prism
What what what?
The Tick function returns S_OK in C++.

Well, maybe it's different in C# tongue.gif
marines
QUOTE (Prism @ Aug 17 2004, 12:10 AM)
What what what?
The Tick function returns S_OK in C++.

Well, maybe it's different in C# tongue.gif

in dsidebar.idl file there is

QUOTE
interface IPanel : IDispatch {
[...]
HRESULT Tick(VARIANT_BOOL minute, [out,retval]VARIANT_BOOL*
heightChanged);


in pure C++ U have to bother with HRESULT - it is C-like error-handling
in C# U don't have to bother with it, U even don't see it at all - there error-handling is done by exceptions and function looks like (routine returns this what U see in IDL as [out,retval])

bool Tick(bool minute);

U don't see all these ugly and terrible HRESULT, VARIANT_BOOL etc. bleeech ohmy.gif wacko.gif dry.gif
in pure C++ and COM U can't use C++ exceptions across the calls, because if on the stack there is e.g. call from VB or C# then U will probably get very undefined behaviour tongue.gif and it is next reason why I don't like COM in pure C++


according to question of this thread - routine Tick should return true if height of your panel has changed, else return false
AFAIK if U return true and panel has enabled Auto-Fit, then it will be automatically fit according to new height

BTW if some parameters are confused, then dsidebar.idl file may be really helpful biggrin.gif
eitaneko
Thanks marines, I will look at it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.