delphi - How to resolve undeclared identifier problems -


i pretty new in delphi xe7, got project , tried build it, gives error like

undeclared identifier 'images'

in line..

(tcontainedaction(action).actionlist.images.draw(acanvas, glyphrect.left, glyphrect.top) 

and

tcontainedaction not contain member named 'image'.

please me resolve issues.

the error simple enough understand. no variable or member defined in scope code searching.

undeclared identifier 'images'

tcontainedaction.actionlist of type tcontainedactionlist. , tcontainedactionlist has no member named images. hence error.

you need up-cast tcontainedactionlist reference of type has member looking for. don't know type because can't see of code other in question. perhaps cast tactionlist suffice.

you playing fire using unchecked casts. use runtime checked casts instead find out if got wrong.

uses   system.actions, vcl.actnlist; .... var   actionlist: tactionlist; .... actionlist := (action tcontainedaction).actionlist tactionlist; // can refer actionlist.images; 

one thing unclear why need cast action. since not know action cannot advise, beyond commenting casting feels odd.

tcontainedaction not contain member named 'image'

this error message not match code in question.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -