You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The methods TJvPropertyStorage.StoreAnyProperty and .LoadAndyProperty both check whether a SetProc exists. Otherwise they won't try to store / load the property. I think this is wrong ro class and interface properties as these do not need a setter method to load the properties of that class / interface. Therefore I propose the following change:
procedure TJvPropertyStorage.LoadAnyProperty(PropInfo: PPropInfo);
begin
try
if (PropInfo <> nil) and ((PropInfo.SetProc <> nil) or (PropInfo.PropType^.Kind in [tkClass, tkInterface])) then
ReadProperty(AppStoragePath, GetItemName(PropInfo.Name), TPersistent(FObject), PropInfo.Name);
except
{ ignore any exception }
end;
end;
procedure TJvPropertyStorage.StoreAnyProperty(PropInfo: PPropInfo);
begin
if (PropInfo <> nil) and ((PropInfo.SetProc <> nil) or (PropInfo.PropType^.Kind in [tkClass, tkInterface])) then
WriteProperty(AppStoragePath, GetItemName(PropInfo.Name), TPersistent(FObject), PropInfo.Name);
end;
I think I have seen the same check somewhere else in the JVCL already but I currently can't find it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The methods TJvPropertyStorage.StoreAnyProperty and .LoadAndyProperty both check whether a SetProc exists. Otherwise they won't try to store / load the property. I think this is wrong ro class and interface properties as these do not need a setter method to load the properties of that class / interface. Therefore I propose the following change:
I think I have seen the same check somewhere else in the JVCL already but I currently can't find it.
Beta Was this translation helpful? Give feedback.
All reactions