[AccessD] Basic Unbound Form with Classes and Collections Par t 1.

DWUTKA at marlow.com DWUTKA at marlow.com
Fri Jun 9 16:13:05 CDT 2006


Why do you say they are not properties?  They show up in intellisense as
properties of the class.  You can set and retrieve their values.

I know what you are saying if you go into the object browser, you won't see
the word property, however, from the code page you can't tell the
difference.

I also COMPLETELY understand the difference between them, but please keep in
mind that this was a BASIC tutorial.  It shows both diversity and is simple
to code.  I completely disagree with you on it defeating the purpose of data
encapsulation.  If a value is not going to have any work done on it at all,
Public MyValue is just as efficient as a property Get and Let statement. (In
fact, I would think it would be faster...but I'm just guessing there).  

Drew

-----Original Message-----
From: Heenan, Lambert [mailto:Lambert.Heenan at aig.com]
Sent: Friday, June 09, 2006 4:01 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Basic Unbound Form with Classes and Collections
Par t 1.



<snip>

Our table has three fields, so we'll create three easy properties, and a
fourth which will be derived.

So, in the code page type the following under the 'Option Compare Database'
line:

Public ID As Long
Public FirstName As String
Public LastName As String

[ These are not properties at all, they are class member fields, and making
them public is a Q&D solution which defeats the purpose of data
encapsulation that classes offer. A real property Get and Set pair would
correct this, with the member fields being change to Private]

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