Freddy supplied the code to build a timer to be used in pages in the Role Tailored Client. His blog entry about the timer is here.
Some of the comments show that developers have had the same problem that I ran into. I change the code just a little bit. Freddy’s code is
[code lang=”csharp”]public override string Value
{
get
{
return base.Value;
}
set
{
base.Value = value;
if (!int.TryParse(value, out interval))
{
interval = 0;
}
interval = interval * 100;
if (timer != null && timer.Interval != interval)
{
timer.Interval = interval;
count = 0;
if (interval == 0)
timer.Stop();
else
timer.Start();
}
}
}
[/code]
I moved the line “timer.Interval = interval;” down four lines.
[code lang=”csharp”]public override string Value
{
get
{
return base.Value;
}
set
{
base.Value = value;
if (!int.TryParse(value, out interval))
{
interval = 0;
}
interval = interval * 100;
if (timer != null && timer.Interval != interval)
{
count = 0;
if (interval == 0)
timer.Stop();
else
timer.Interval = interval;
timer.Start();
}
}
}
[/code]
and the problem was solved.
Hi Gunnar,
Thanks for correcting Freddy’s Timer. Freddy’s Timer works when I start the page from the classic client but not directly form the RTC. Then the RTC client crashes. I have tried your dll but that one doesn’t work also. But the surprising is the following. After I have tried your dll and use Freddy’s dll again, than Freddy’s dll works fine. I have repeated this scenario on two other computers. I am not a C# developper. Have you any idea how to solve this?
Regards,
Peter Wilson
I can just suggest looking at the add-in folder for the role tailored client to make sure you have the correct dll there. Also make sure that you have the correct line in table “Client Add-in” and that you compile the page with the correct dll. This is working in my environment without problems.
Now your dll works fine. Probably I had compiled the page with the wrong dll.