Subject RE: [IBO] Using colorscheme
Author Norman Dunbar
Morning,

'inherited' is a Delphi call which lets you call a method in the base class
(or parent class) and you see it a lot in component design where you have to
call, say, the inherited create() function in an over ridden (?) method. So
you might have something like :

MyComponent.OnClick(.....)
begin
inherited;
rest of custom code here ...
...
end;


In C++ there is a trick used (in the BCB5 Developers Guide) which does a
similar thing :

in the .h file defining your class :

class MyClass : public ParentClass {
typedef inherited ParentClass;
...
}

in the .cpp file implementing your class :

void MyClass::DoSomething(stuff....)
{
inherited::DoSomething(stuff.....);
more code here....
}

alternatively, if you are using someone else's class/component definitions
and either don't have the source code, or don't want to change it to add the
typedef, you can simply do this :

void MyClass::DoSomething(stuff....)
{
ParentClass::DoSomething(stuff.....);
more code here....
}

The problem is, in Delphi, you simply say 'inherited' and the parent class'
method is called for you. In C++ you need to know what the parent class is
called before you can call the method.


HTH


Regards,
Norman.

-------------------------------------
Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar@...
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com
-------------------------------------


-----Original Message-----
From: Riho-Rene Ellermaa [mailto:r.ellermaa@...]
Sent: Wednesday, May 14, 2003 6:21 AM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] Using colorscheme



I would gladly try it if I could understand what is this "Inherited" you are
refering to.
(I'm using BCB, noy Delphi). And so far as I know there are no Inherited
things to call in events.

Maybe small code snippet would help me understand

Riho-Rene Ellermaa
senior programmer

This email is intended only for the use of the addressees named above and
may be confidential or legally privileged. If you are not an addressee you
must not read it and must not use any information contained in it, nor copy
it, nor inform any person other than Lynx Financial Systems or the
addressees of its existence or contents. If you have received this email
and are not a named addressee, please delete it and notify the Lynx
Financial Systems IT Department on 0113 2892990.