Is it possible to get rid of cluttering up code with unnecessary functions when writing a class?
SomeClass1 = class SomeValue : Record z:integer; end; end; SomeClass2 = Class SomeRec : SomeClass1; end; SomeClass3 Private MyClass : SomeClass2; Public Property SomeVal : integer read MyClass.SomeRec.SomeVal.z;//<<<Тут ошибка End;
Is it necessary in SomeClass3 to make an additional function for reading SomeVal.z? or you can eat this tricky design right in the description of Property SomeVal
SomeClass3 Private Function ReadSomeVal:integer; MyClass : SomeClass2; Public Property SomeVal : integer read ReadSomeVal; End; implementation Function SomeClass3.ReadSomeVal; Begin Result:=MyClass.SomeRec.SomeVal.z; end;
MyClass = nil
, and the call to the service will end with AV? - Nofate ♦