From f0361612ce77e5a98f74e4e3cfb92d1f71039efa Mon Sep 17 00:00:00 2001 From: Thulio Bittencourt Date: Mon, 29 Mar 2021 12:39:03 -0300 Subject: [PATCH] Update Router4D.History.pas --- src/Router4D.History.pas | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/Router4D.History.pas b/src/Router4D.History.pas index 0e92f8e..349aa72 100644 --- a/src/Router4D.History.pas +++ b/src/Router4D.History.pas @@ -111,7 +111,7 @@ var begin Result := Self; if not FListCacheContainer.TryGetValue(aKey, auxObject) then - FListCacheContainer.TryAdd(aKey, aObject); + FListCacheContainer.Add(aKey, aObject); end; function TRouter4DHistory.GetHistoryContainer(aKey: String): TFMXObject; @@ -147,7 +147,7 @@ var begin Result := Self; if not FListCacheContainer.TryGetValue(aKey, auxObject) then - FListCacheContainer.TryAdd(aKey, aObject); + FListCacheContainer.Add(aKey, aObject); end; function TRouter4DHistory.GetHistoryContainer(aKey: String): TPanel; @@ -203,7 +203,7 @@ begin exit; end; - FListCache.TryAdd(aKey, aObject); + FListCache.Add(aKey, aObject); end; @@ -230,30 +230,9 @@ begin CachePersistent.FPersistentClass := aObject; CachePersistent.FSBKey := aSBKey; - try FListCache2.TryAdd(aKey, CachePersistent); except end; + try FListCache2.Add(aKey, CachePersistent); except end; end; -//procedure TRouter4DHistory.CacheKeyNotify(Sender: TObject; const Key: string; -// Action: TCollectionNotification); -//begin -// inherited; -// -// case Action of -// cnAdded: -// begin -// Self.FListCacheOrder.Add(Key); -// Self.FIndexCache := Self.FListCacheOrder.Count-1; -// end; -// -// cnRemoved: -// begin -// Self.FListCacheOrder.Remove(Key); -// Self.FIndexCache := Self.FListCacheOrder.Count-1; -// end; -// end; -// -//end; - constructor TRouter4DHistory.Create; begin FListCache := TObjectDictionary.Create;