OOP_(re)

Thu, 29 May 1997 10:44:43 +0100 (BST)


On Wed, 28 May 1997 15:46:06 -0400 (EDT) Pierre Phaneuf  wrote:
>On Wed, 28 May 1997, The African Chief wrote:

[...]

>Maybe the InstanceFromSelfID is valid (though I'd simply use the instance
>pointer as a handle), but (in a Turbo Vision context) only TView should
>have a Handle, because it is the first class that can possibly have a
>window handle. The InstanceFromHandle would hence return a PView or a
>PWindow, which is much more useful, since TView/TWindow has methods for
>window manipulation that TObject doesn't even have.

Yes, that is correct. The handle is not not necessary in TObject - but
I still feel that it does no harm to have it there.

>> It has a present use - to be able to locate every object instance by its 
>> own unique ID. See above.
>
>The instance pointer is an unique ID, why have another redundant one?

Yes, the instance pointer is a unique ID. But this assumes that you
know the instance pointer. This will be the case in most situations,
but it won't always be the case. And, like I said in another post, there
are things that you can do with integers that you cannot do with 
pointers.

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



The African Chief (laa12@cc.keele.ac.uk)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es