Page 1 of 1
NinjaCal doesn't always refresh the calendar
Posted:
Thu May 12, 2011 3:15 pm
by eugenet
Hi, since I've added a second source to the calendar, selecting a date from the mini-calendar doesn't always work. It always displays the selected date in the header of the calendar, but the contents don't change. you have to hit 'refresh' to get it to actually load the calendar contents.
Anyone else have this problem?
Re: NinjaCal doesn't always refresh the calendar
Posted:
Fri May 13, 2011 7:02 am
by JasonYoung
Hi Eugene,
I've seen similar behavior, and it can be caused by a few things. The place to check is in the script:
Date Specific ( Date ) under the comment #Is the current date visible
The If statement there uses a pretty complex calc to decide whether or not to set the variable $SC_RefreshData to "No." That determines later down the script whether to do a Full scripted refresh, or just call FileMaker's refresh window script step. If you have the debugger, than see if that variable is getting set to "No." If you don't have the debugger, you can add a temporary dialog script step after the If statement and have it show you the value of $sc_Mode (old school).
If it is getting set to "No," you've got two choices: you can try to debug that calculation and figure out why it's resolving as true and setting the variable to "No", or you could just disable the whole if statement ensuring the variable will never get set, and a full refresh should happen every time. The full refresh is fast, so unless you're on the WAN it won't make much of a difference.
Let me know if I'm even close,
-Jason
Re: NinjaCal doesn't always refresh the calendar
Posted:
Fri May 13, 2011 2:57 pm
by eugenet
Hi Jason,
Thanks, I don't have time to debug the script right now, so I'm settling for the full refresh by disabling the If statement for now. Works fine for the moment, speed hasn't really suffered that much.
Regards,
Eugene
Re: NinjaCal doesn't always refresh the calendar
Posted:
Fri May 13, 2011 3:09 pm
by JasonYoung
Understood. I'm thinking adding the second source has introduced something in that calc to make it return true when it shouldn't some times. I've seen this happening by adding rows to the portal making the calendar range fall into the next day, and some other things too. There is a lot going into that calc!
Thanks for the feedback!
-Jason
Re: NinjaCal doesn't always refresh the calendar
Posted:
Fri May 13, 2011 3:26 pm
by eugenet
Interesting. I added the scrollbar to the portal when I was using the 15 min timescale, but since I've dropped down to 30 mins, I can revert back to non-scrolling. If I do this and reenable the If statement and it works out, I'll let you know.
Thanks for the tip!
Eugene