Page 1 of 1

stall when no items in one of two sources

PostPosted: Thu May 12, 2011 7:03 pm
by eugenet
i have two sources being displayed, however, when one source has no records for a particular day (in day view), but items in the other, the entire calendar stalls when I go to that day.

Command-. 'fixes' it, but was wondering if there is a workaround.

Re: stall when no items in one of two sources

PostPosted: Fri May 13, 2011 7:17 am
by JasonYoung
Hi Eugene,

I think might be an issue with certain variables not getting initialized before the loops run. We've corrected this in our current build, but I think you might have the one before.

In the script:

Insert iCal File Into Calendar { UseExistingData } inder the comments #Read all sources to get started

Make sure the variables: $sc_CountWritten[$sc_SourceNo] ; $sc_CountEvents[$sc_SourceNo] and $sc_count[$sc_sourceNo] are all getting initialized as per the attached image under the comments #source is active and #source is inactive. If they're not, it can cause certain loops to get stuck.

Insert iCal File Into Calendar.png
Insert iCal File Into Calendar.png (163.6 KiB) Viewed 8178 times



Let me know if I'm close on that one as well,
-Jason

Re: stall when no items in one of two sources

PostPosted: Fri May 13, 2011 2:54 pm
by eugenet
Hi Jason,

Thanks much, that was it. In both #source is active and #source is inactive forks, the $sc_CountWritten var wasn't being set to 0. I'm pretty sure I didn't touch that part of the script, is this a change from previous builds?

Nevertheless, thanks again.

Re: stall when no items in one of two sources

PostPosted: Fri May 13, 2011 3:03 pm
by JasonYoung
Hi Eugene,

It is a change. This was corrected in Calendar 2.2.

Thanks!