As far as I know, properties cannot be overridden. However, you could consider using subrange types, as the example below shows.
type Fruit = (Apple, Banana, Cherry, Orange, Pineapple); LimitedFruit = Apple..Cherry; You can use the full enumeration as the property's type, and then restrict its value using a custom property setter. ------ Original Message ------ Subject: [fpc-pascal] Extending an enumeration Date: Sun, 18 Jul 2010 16:23:13 +0000 To: fpc-pascal@lists.freepascal.org From: Mark Morgan Lloyd <markmll.fpc-pas...@telemetry.co.uk> > If I have a class with a property Phase: TrrPhase where TrrPhase is an > enumeration such as (rrQuiescent, rrInitialised), is there an elegant > way of extending the enumeration and overriding the property type so > that a derived class can use the new values? > -- Jetcheng Chu http://people.rerouted.org/jcchu _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal