The error is simple enough to understand. No variable or member is defined in the scope which your code is searching.
undeclared identifier 'Images'
TContainedAction.ActionList
is of type TContainedActionList
. And TContainedActionList
has no member named Images
. Hence the error.
You will need to up-cast the TContainedActionList
reference to be of a type that has the member you are looking for. I don't know what that type is because I can't see any of your code other than that in the question. Perhaps a cast to TActionList
will suffice.
You are playing with fire by using unchecked casts. Use runtime checked casts instead so that you find out if you got it wrong.
uses
System.Actions, Vcl.ActnList;
....
var
ActionList: TActionList;
....
ActionList := (Action as TContainedAction).ActionList as TActionList;
// now you can refer to ActionList.Images;
One thing that is unclear is why you need to cast Action
. Since we do not know what Action
is we cannot advise, beyond commenting that all this casting feels odd.
TContainedAction does not contain a member named 'image'
This error message does not match any code in the question.