Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Option "MultiDayHorz" in View Property crashing application

I have found the SRP Schedule control to be unstable when setting the View property to "MultiDayHorz". When a form is opened and the View property is set to "MultiDayHorz" in the CREATE event, it will intermittently freeze and then close the whole OI application. In testing, I found that I could open a test form configured this way and it will sometimes open several times without any problems, but sometimes it will freeze and crash. Once this happens, subsequent attempts at restarting the application and opening this form seems to have a higher rate of crashing.

Here is the CREATE event code so you can see how I am testing it. I am not using the 64 bit version of the control. Are you seeing this behavior also?

Event WINDOW.CREATE(CreateParam) Gosub SetupSchedule SRP_Show_Window(@Window, "SYSTEM", "C", "C") End Event ! -------------- INTERNAL SUBROUTINES -------------------------- SetupSchedule: Declare function Min, Max oleCtrl = @Window:".OLE_SCHEDULE" Set_Property(oleCtrl, "OLE.Server", "") Set_Property(oleCtrl, "OLE.EntityMinSize", 35) Set_Property(oleCtrl, "OLE.TimeRange", 7:@fm:19) Set_Property(oleCtrl, "OLE.Interval", 60) Set_Property(oleCtrl, "OLE.IntervalSize", 20) Set_Property(oleCtrl, "OLE.Autosize", 2) Set_Property(oleCtrl, "OLE.ShowTree", 0) Set_Property(oleCtrl, "OLE.AppointmentMetrics", "":@fm:4) // Remove conflict zones Set_Property(oleCtrl, "OLE.ConflictColor", "None") // Change view Set_Property(oleCtrl, "OLE.View", "MultiDayHorz") // Create Entities Desc = "Treat this like a subheading." Data = "" Data<-1> = "GRP" :@VM: 1 :@VM: "GroupKey1" :@VM: "Main Group 1" :@VM: Desc Data<-1> = "ENT" :@VM: 2 :@VM: "EntityKey1-1" :@VM: "Entity 1" :@VM: Desc Data<-1> = "ENT" :@VM: 2 :@VM: "EntityKey1-2" :@VM: "Entity 2" :@VM: Desc Data<-1> = "GRP" :@VM: 1 :@VM: "GroupKey2" :@VM: "Main Group 2" :@VM: Desc Data<-1> = "ENT" :@VM: 2 :@VM: "EntityKey2-1" :@VM: "Entity 3" :@VM: Desc Data<-1> = "GRP" :@VM: 2 :@VM: "GroupKey2-1" :@VM: "Sub Group" :@VM: Desc Data<-1> = "ENT" :@VM: 3 :@VM: "EntityKey2-1-1" :@VM: "Entity 4" :@VM: Desc Data<-1> = "ENT" :@VM: 3 :@VM: "EntityKey2-1-2" :@VM: "Entity 5" :@VM: Desc Set_Property(@Window:".OLE_SCHEDULE", "OLE.EntityList", Data) Desc = "This is a long description of the appointment, which contains very important details" ForeColor = "RGB{255, 255, 255}" // Give all appointments a lead time of 60 minutes LeadTime = 0.041667 // Create random appointments for the next 30 days Appts = "" ID = 0 For i = 1 to 30 Count = 0 CurrDate = Date() + i GoSub Get_Random_Data Appts<-1> = "EntityKey1-1":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime Count = Count + 1; ID = ID + 1 GoSub Get_Random_Data Appts<-1> = "EntityKey1-2":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime Count = Count + 1; ID = ID + 1 GoSub Get_Random_Data Appts<-1> = "EntityKey2-1":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime Count = Count + 1; ID = ID + 1 GoSub Get_Random_Data Appts<-1> = "EntityKey2-1-1":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime Count = Count + 1; ID = ID + 1 GoSub Get_Random_Data Appts<-1> = "EntityKey2-1-1":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime Count = Count + 1; ID = ID + 1 GoSub Get_Random_Data Appts<-1> = "EntityKey2-1-2":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime Count = Count + 1; ID = ID + 1 GoSub Get_Random_Data Appts<-1> = "EntityKey2-1-2":@VM:ID:@VM:StartTime:@VM:EndTime:@VM:BackColor:@VM:ForeColor:@VM:"Appt ":Count:@VM:Desc:@VM:LeadTime Count = Count + 1; ID = ID + 1 GoSub Get_Random_Data Next i // Add the appointments Set_Property(@Window:".OLE_SCHEDULE", "OLE.AppointmentList", Appts) return Get_Random_Data: // Generate random times Time1 = Rnd( 48 ) * 1800 Time2 = Rnd( 48 ) * 1800 // Convert to OI Internal DT format StartTime = IConv(OConv(CurrDate - Rnd(2), "D4/") : " " : OConv(Min(Time1, Time2), "MTS"), "DT") EndTime = IConv(OConv(CurrDate, "D4/") : " " : OConv(Max(Time1, Time2), "MTS"), "DT") // Generate random back color BackColorHue = Rnd(256) BackColor = "HSL{":BackColorHue:", 127, 45}" return

Comments

  • Dan - Kevin is on an extended vacation so we might have to wait to see if this is something he needs to look into. In the meantime, you and I can work on this together to try and isolate the problem. Before I copy your code and test it locally, I am wondering if you could do two things first:
    1. Verify the version of the SRPControls.ocx (just right-click on the file, open Properties, and then the Details tab).
    2. Set the View property first and see if that improves stability.
  • Don -
    1) The version is 4.1.0.12 and
    2) It looks like setting the View property first has increase stability greatly. I'll do further testing to see if it still shows any sign of being unstable.

    Thanks!
Sign In or Register to comment.