On Tue, 27 May 1997 17:59:50 -0400 (EDT) Pierre Phaneuf pp@dilu.ml.org wrote:
On Mon, 26 May 1997, The African Chief wrote:
[...]
At the moment, "Parent" and "Child" do nothing, and "Handle" is for projected future use (for handles to windowed objects - Win32, etc).
Well, this is *exactly* what object-orientation is there for, so you add the fields when you need them. TObject itself is a "do-nothing" object. As such, it is *not* windowed and should *not* have any Handle field as it won't ever have ANYTHING in it! A TWindow descendent shall add this field.
Yes (but Handle is present in Delphi as well). However, the main reason for keeping it is because the OBJECTS unit exports a function which returns a pObject, which can be used to locate an object instance by its Handle (i.e., given any Handle, you would thereby be able to locate its owner). This can also be done via the object's SelfID (see below) in cases where the SelfID and Handle are different (which would invariably be the case).
This is not an academic issue, because I have seen the utility of this facility in other contexts (viz - my portable "CHIEFAPP" class library, for BP 7.x, Delphi1 and Delphi2, from which project this OBJECTS unit was borrowed and cannibalised). Thus, the fields need to be in the ultimate "mother of all objects".
"SelfID" is an integer which holds a unique numeric ID for each living TObject descendant.
Does this have any projected use?
It has a present use - to be able to locate every object instance by its own unique ID. See above.
Best regards, The Chief Dr Abimbola A. Olowofoyeku (The African Chief, and the Great Elephant) Author of: Chief's Installer Pro v3.50 for Win16 and Win32. Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ E-mail: laa12@cc.keele.ac.uk