[fpc-devel] TComponent.ChangeName() not virtual?

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Mar 24 15:24:35 CET 2010

Vincent Snijders het geskryf:
> Obviously, so that descendants can call it.

I see TComponent also has a SetName() method [the actual setter method for
the Name property], and the SetName() method actually calls the
ChangeName() method.

  procedure SetName(const NewName: TComponentName); virtual;

The TComponent.SetName is virtual, so that solves my problem, but I still
don't see why ChangeName is even there? Why have two methods to do one
task? What purpose does ChangeName() have? Why couldn't SetName() set the
internal field variable FName?

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-devel mailing list