Exit(TStringTree(FItems[0]); Anyway, isn't better if the children itself is generic? See my gtree implementation: http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-stl/src/gtree.pp
-- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/returning-a-generic-object-tp5716433p5716442.html Sent from the Free Pascal - General mailing list archive at Nabble.com. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal