sharing TObjectlist between Forms / Classes
Posted on 2011-02-16
In my form 1 I create an ObjectList, Form 2 has a Property xObjectList : TObjectList read FObjectList write Fobjectlist, where FObjectList is a local varible of Form 2.
I have been thinking that it is not a good programming style to do something like
Form2. xObjectList := Form1.ObjectList;
Therefore I change Form2 :
FObjectList := TObjectList.create;
in form1 I did something like :
form2.Form2. xObjectList := Form1.ObjectList; // now with assign inside form 2
if (Form2.Modalresult = mr ok ) then
Form1.ObjectList := Form2.ObjectList
but the new version is creating an abstract error
q1) what is an abstract error ?
q2) any chance to see the root cause of the abstract error by checking map file or ...
q3) which solution is better in respect to a good programming style ???
--- need no code , just a good explanation ---- !!!!