I have a canvas subclass (CanvScheduleViewer) with a few shared properties. These are accessed via (non-shared) computed properties to allow default values and some necessary calculations.
Seems whenever I open a new window with one of these canvas subclasses in it, the non-shared computed property will be set to the defaults (such as 0 for integers, and false for booleans) and that will set the shared properties to the same values.
I don’t think I can change the non-shared computer properties to shared computer properties since they use values based on the current instance for some calculations.
A quick example is I have a widthPerDay local computed integer:
[code]Public Property widthPerDay as Integer
if CanvScheduleViewer.mWidthPerDay = 0 then
CanvScheduleViewer.mWidthPerDay = 110
if autoResizeDayWidths then
Return (me.Width-BorderLeft - BorderRight) / daysToShow
CanvScheduleViewer.mWidthPerDay = value
Here’s the shared integer it’s referencing:
Public Shared Property mWidthPerDay as Integer
However whenever a CanvScheduleViewer is created, it will set widthPerDay = 0, which sets CanvScheduleViewer.mWidthPerDay to zero.