Paul Ishenin het geskryf: >> > SetName obviosly more than just set FName. And how to protect FName and > at the same time give a way to change it without hooking the events?
OK, that make sense, but then the same could be accomplished by simply moving FName to the protected section. After all, nobody can override ChangeName() because its not virtual, so all that it will ever do is just set the FName field variable. A developer wanting to bypass the code in SetName, could then simply set FName directly - and get rid of the pointless ChangeName method.. Either way, my initial problem has been solved by overriding the SetName() method. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel