Simple view for Day and Week display error?

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 40
Joined: Wed Oct 06, 2010 6:49 pm
PostPosted: Mon Dec 27, 2010 11:30 pm
(I searched the forum and couldn't find this one)

Possible bug... or I broke something
With the calendar in "simple" mode sometimes the Day and Week will show events spaced out as if the calendar was showing "time".

To reproduce:
- Create multiple events with start times (and optional end times) spread out on a single day.
- Change the calendar to "simple" view and select the Day or Week tab... so far all is well.
- Switch to the Company or Contact layout
- Switch back to the Calendar layout... the tab should still be based on your previous selection (Day or Week), but now all the events are spaced out.

Clicking Refresh does not fix the events, but switching to Day or Week (the one you are not currently viewing) will fix the events back to a "simple" view.

Thanks

SCC build 2.2
Image
Posts: 40
Joined: Wed Oct 06, 2010 6:49 pm
PostPosted: Tue Dec 28, 2010 12:59 am
Just checked this with an archive of SCC build 2.2 as it was shipped (no modifications), I was able to reproduce the display bug with the steps listed.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Dec 28, 2010 8:48 am
Nice catch! And I love this one because it is one of those bugs that acts differently with Script Debugger on. =)

I have a fix here and will write up instructions shortly.

Thanks!
John Sindelar
SeedCode
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Dec 28, 2010 10:49 am
So here is how to fix this in your copy.

Edit the script "Load Calendar Layout" and add the first two lines shown in blue below:

Image

Now grab the calc used in the If() of the last line shown in blue and change it to this:

Code: Select all
Let ( [
m = $$sc_Mode ;
dayview = GetLayoutObjectAttribute ( "Day" ; "IsFrontTabPanel" ) ;
weekview = GetLayoutObjectAttribute ( "Week" ; "IsFrontTabPanel" ) ;
tabs = SeedCode_FrontTabName ( 1 ; LayoutObjectNames ( Get ( FileName ) ; Get ( LayoutName ) ) )
] ;
Case (

$sc_DaySimple  and dayview  and $$sc_Mode ≠ "Day" ; Let ( $$sc_Mode = "Day" ; 1  ) ;

not $sc_DaySimple and PatternCount ( tabs ; "Calendar Day" )  and dayview and $$sc_Mode ≠ "Day Sched" ; Let ( $$sc_Mode = "Day Sched" ; 1  ) ;

$sc_WeekSimple and weekview and ( $$sc_Mode ≠ "Week")  ; Let ( $$sc_Mode = "Week" ; 1  ) ;

not $sc_WeekSimple and PatternCount ( tabs ;  "Calendar Week"  ) and weekview and $$sc_Mode ≠ "Week Sched" ; Let ( $$sc_Mode = "Week Sched" ; 1  ) ;

PatternCount ( tabs ; "Calendar Month" )  and $$sc_Mode ≠ "Month" ; Let ( $$sc_Mode = "Month" ; 1  ) ;

PatternCount ( tabs ; "Calendar Resource Scheduling - Vertical" ) and $$sc_Mode ≠ "Resource Sched Vert" ; Let ( $$sc_Mode = "Resource Sched Vert" ; 1  ) ;

PatternCount ( tabs ; "Calendar Resource Scheduling - Horizontal" )  and $$sc_Mode ≠ "Resource Sched Horiz" ; Let ( $$sc_Mode = "Resource Sched Horiz" ; 1  ) ;

PatternCount ( tabs ; "Calendar Gantt" )  and $$sc_Mode ≠ "Gantt Sched" ; Let ( $$sc_Mode = "Gantt Sched" ; 1  ) ;

0

))


It's nice that this makes the calc more efficient as well. I'm not sure if you were going "back" to the calendar using the layout menu or by clicking "back" but there is an issue with the back routine as well when it comes to the "simple" views...

Now edit the script "Go Back" by finding the "Else" right before the comment "Go to object (tab)" and replacing it with an End If. Then deleting the "End If" right before the comment "Manage FWD and Back". Do the same in the script "Go FWD"

That's it. And thanks again for catching this!
John Sindelar
SeedCode
Posts: 40
Joined: Wed Oct 06, 2010 6:49 pm
PostPosted: Tue Jan 04, 2011 12:53 pm
Thanks John.

In the Go FWD script there is no "Manage FWD and Back" comment/code (and no "Declare destination as local variables" comment/code either)


I assume the End If that needs to be removed in Go FWD is the one after End Loop for "Go to object (tab)"

Is this correct?

BTW, your use of Comments throughout all of SCC's scripts is outstanding!
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Jan 04, 2011 1:24 pm
Thanks! I think you're right about the script but 've printed out the whole GoBack script so you can see what we've done.

Hope that helps.
John Sindelar
SeedCode

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 2 guests

(855) SEEDCODE
[email protected]
Follow us: