TIP: Click on subject to list as thread! ANSI
echo: pascal
to: FRANS FLIPPO
from: SCOTT LITTLE
date: 1998-04-20 15:24:00
subject: Object Orientation

 [ Quoting Frans Flippo to Scott Little ]
 SL> is there any way for objects to refer to their ancestors without using
 SL> var : myobject?
 FF> most standard Delphi and Turbo Vision objects have a Parent field,
 FF> which points to their ancestors.
Umm? I mean like:
type
 topobject = object
  one : oneobject;
  two : twoobject;
  {more of the same}
  counter : word;
 end;
begin
procedure oneobject.init;
begin
 {how to I access the Counter from here, without 'var top : topobject'?}
end;
I know, it's not good OOP, but it would make it easier for now until I go
back and fine tune everything.
-- Scott Little, 3:712/848@fidonet ; slittle@fairfax.com.au
                                     www.asstdc.com.au/~cyberia
   NOTE: admin@cyberia.asstdc.com.au is temporarily offline.
--- FMail/Win32 1.22+
---------------
* Origin: Cyberia: You know you want it. [02-9534-1702] (3:712/848)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.