On Thu, 8 Sep 2005, Robert Pointon wrote: > calling with mlist.MyList:= memo1.Lines; works fine. > calling with Mlist.Mynum := 99; Access error.
Are you sure you don't have that backward? > type TInhertProducts = Class(TObject) > private > FMyList: TStrings; > FMynum: integer; > constructor create; That constructor almost certainly isn't supposed to be private. > constructor TInhertProducts.create(); > begin > inherited ; > // Tstringlist NOT TStrings > FMyList := TStringlist.Create; > end; Don't forget to free FMyList in your class's destructor. > procedure TInhertProducts.SetMyList(const Value: TStrings); > begin > FMyList := Value; > end; That's no good. You're *overwriting* the TStringList that you creating in your constructor. You really want to keep using the same TStringList, but just change its contents. FMyList.Assign(Value); -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

