PDA

View Full Version : Property on subclass, how to use it?



grandpaw broon
February 8th, 2009, 07:27 PM
Hey all,

I do not really know how to do this correctly an i thought i would iron it out.

If i have an abstract class with a private property _icon:Bitmap or a private method called... moveIcon().

Well all of my button classes will have an icon hence inheriance, but in the new classes, i cannot reference the private properties nor override the private methods. Im sure there is a reason for this but the question is, how can i make my _icon property available to classes that extend it without making it public?

Thanks :D

Krilnon
February 8th, 2009, 08:03 PM
Use protected instead.

grandpaw broon
February 9th, 2009, 06:11 AM
Thanks Mate, appreciated