OOP_(re)

Thu, 29 May 1997 15:59:51 -0400 (EDT)


On Thu, 29 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.

What if it did? What if I use a windowing system that has long integers
for window handles? You have a field there that's basically of *no use*.

> >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.

I don't know. Why would you know more the integer ID than the instance
pointer? And what kind of things would you do with an unique integer ID?

Pierre Phaneuf

"The use of COBOL cripples the mind; its teaching should, therefore, be
regarded as a criminal offense." - Edsger W. Dijkstra.


Pierre Phaneuf (pp@dilu.ml.org)

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