[AccessD] Classes, Recordsets, and problems inbetween

Arthur Fuller artful at rogers.com
Mon May 12 08:28:01 CDT 2003


Not quite, JC. Overloading means that a single method name can have several
signatures. The second through nth overload need not be in a child class.
Any given class, for example, could have two or more Init() methods: one
that takes no parameters, one that accepts say an int and a string, and a
third that accepts an int, a string and a date. The rules of overloading
are: you cannot have two methods with identical signatures. If you create a
child method with the same name as a parent method, that calls the parent
method either before or after running its own code, that is not overloading;
that is extending.

Arthur

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby
Sent: May 12, 2003 8:52 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Classes, Recordsets, and problems inbetween


Gustav

With true OO with inheritance, a function that is available in the parent
class can be replaced in the child class so that whatever functionality the
parent's function provided can be overriden.  Overloading is a method of
performing this processing in the class, but further allows the parameters
passed in to the class to be replaced as well.  For example FunctionA in one
child class may accept an integer, in another it may accept a real.  Since
the parameters are different, the correct child class can automatically be
selected by the runtime based on the type of data passed in.  If I am
passing in an integer I must be intending to use that specific child class,
whereas if I pass in a float I must intend to use this other child.

Since Access only has interface inheritance, it doesn't implement any of the
OO stuff of more powerful languages (such as VB.Net), and all discussions of
such capabilities is moot.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Gustav Brock
Sent: Monday, May 12, 2003 8:36 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Classes, Recordsets, and problems inbetween


Hi John

> Overloading definitely is not supported in Access VBA.

Just thinking logically:
If that was the case it wouldn't be overloading?

(Guess I'm showing that I have no idea of what overloading in VB is about).

/gustav

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list