From: <ah...@us...> - 2010-03-16 22:35:36
|
Revision: 12727 http://jvcl.svn.sourceforge.net/jvcl/?rev=12727&view=rev Author: ahuser Date: 2010-03-16 22:35:29 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Mantis #5143: JvScheduledEvents -> "cannot assign a TJvEventCollectionItem to a TJvEventCollectionItem" Modified Paths: -------------- trunk/jvcl/run/JvScheduledEvents.pas Modified: trunk/jvcl/run/JvScheduledEvents.pas =================================================================== --- trunk/jvcl/run/JvScheduledEvents.pas 2010-03-16 22:20:45 UTC (rev 12726) +++ trunk/jvcl/run/JvScheduledEvents.pas 2010-03-16 22:35:29 UTC (rev 12727) @@ -129,6 +129,10 @@ property AppStorage: TJvCustomAppStorage read FAppStorage write SetAppStorage; property AppStoragePath: string read FAppStoragePath write FAppStoragePath; public + {$IFDEF COMPILER14_UP} + class destructor Destroy; + {$ENDIF COMPILER14_UP} + constructor Create(AOwner: TComponent); override; destructor Destroy; override; property Handle: THandle read FWnd; @@ -230,6 +234,7 @@ public constructor Create(Collection: TCollection); override; destructor Destroy; override; + procedure Assign(Source: TPersistent); override; procedure LoadState(const TriggerStamp: TTimeStamp; const TriggerCount, DayCount: Integer; const SnoozeStamp: TTimeStamp; const ALastSnoozeInterval: TSystemTime; const AEventInfo: TScheduledEventStateInfo); virtual; @@ -476,6 +481,13 @@ //=== { TJvCustomScheduledEvents } =========================================== +{$IFDEF COMPILER14_UP} +class destructor TJvCustomScheduledEvents.Destroy; +begin + FinalizeScheduleThread; +end; +{$ENDIF COMPILER14_UP} + constructor TJvCustomScheduledEvents.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -780,7 +792,6 @@ FEvents.Assign(Value); end; - procedure TJvCustomScheduledEvents.WndProc(var Msg: TMessage); var List: TList; @@ -817,7 +828,6 @@ end; end; - procedure TJvCustomScheduledEvents.CMExecEvent(var Msg: TMessage); begin with Msg do @@ -915,6 +925,19 @@ end; end; +procedure TJvEventCollectionItem.Assign(Source: TPersistent); +begin + if Source is TJvEventCollectionItem then + begin + Name := TJvEventCollectionItem(Source).Name; + CountMissedEvents := TJvEventCollectionItem(Source).CountMissedEvents; + Schedule := TJvEventCollectionItem(Source).Schedule; + OnExecute := TJvEventCollectionItem(Source).OnExecute; + end + else + inherited Assign(Source); +end; + procedure TJvEventCollectionItem.Triggered; begin FState := sesTriggered; @@ -1581,7 +1604,9 @@ {$ENDIF UNITVERSIONING} finalization + {$IFNDEF COMPILER14_UP} FinalizeScheduleThread; + {$ENDIF ~COMPILER14_UP} {$IFDEF UNITVERSIONING} UnregisterUnitVersion(HInstance); {$ENDIF UNITVERSIONING} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |