mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
Merge branch 'sempare_adaptor_support' of https://github.com/darnocian/delphimvcframework into darnocian-sempare_adaptor_support
This commit is contained in:
commit
86b82cf2c0
@ -106,13 +106,19 @@ begin
|
|||||||
LViewEngine := AObj.AsType<TMVCBaseViewEngine>;
|
LViewEngine := AObj.AsType<TMVCBaseViewEngine>;
|
||||||
LKey := AsString(ADeref, AContext);
|
LKey := AsString(ADeref, AContext);
|
||||||
// check if the key exists in the ViewModel
|
// check if the key exists in the ViewModel
|
||||||
AFound := LViewEngine.ViewModel.TryGetValue(LKey, result);
|
if assigned(LViewEngine.ViewModel) then
|
||||||
if AFound then
|
begin
|
||||||
exit;
|
AFound := LViewEngine.ViewModel.TryGetValue(LKey, result);
|
||||||
|
if AFound then
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
// check if we have a dataset
|
// check if we have a dataset
|
||||||
AFound := LViewEngine.ViewDataSets.TryGetValue(LKey, LDataSet);
|
if assigned(LViewEngine.ViewDataSets) then
|
||||||
if AFound then
|
begin
|
||||||
exit(LDataSet);
|
AFound := LViewEngine.ViewDataSets.TryGetValue(LKey, LDataSet);
|
||||||
|
if AFound then
|
||||||
|
exit(LDataSet);
|
||||||
|
end;
|
||||||
// we don't know anything about the key, so behave accordingly
|
// we don't know anything about the key, so behave accordingly
|
||||||
if ARaiseIfMissing then
|
if ARaiseIfMissing then
|
||||||
RaiseError(APosition, SCannotDereferenceValueOnObject, [LKey, SDictionary]);
|
RaiseError(APosition, SCannotDereferenceValueOnObject, [LKey, SDictionary]);
|
||||||
|
Loading…
Reference in New Issue
Block a user