[AccessD] First real stumble with using VB.Net over VB

Drew Wutka DWUTKA at Marlow.com
Fri Apr 15 10:08:21 CDT 2011


Bingo, you said it better though... thanks!

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Friday, April 15, 2011 9:27 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] First real stumble with using VB.Net over VB

Hi John --

Public class modules variables are implemented in VB6 and VBA the same
way
as properties IOW they have the same programmatic interface from VB6/VBA
(and COM) internals point of view. - this is what Drew has been telling
about here...

Thank you.

--
Shamil
 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: 15 ?????? 2011 ?. 16:44
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] First real stumble with using VB.Net over VB

Drew,

I can't show you documentation but what I can do is show you that a
property
is a function of sorts. 
  It has an entry point on the stack, it accepts a parameter, it returns
a
value.  It has a keyword in the VB language.  It can run any amount of
code
inside of the "function", and do anything that is legal for a function
to do
including dimensioning, reading and writing other variables, running
loops,
doing if then / select case etc., reading and writing to the disk,
downloading files from the internet, formatting your hard disk... you
name
it.

A property is a function.  It happens to be targeted to wrapping
variables
and exposing them to the outside world but that is not all it can do.  A
property does not *define* the variable, that is done in the dimension
statement.  A property does not "own" the variable that it wraps, it is
simply
*returning* the variable.  A property does not have any data storage
area on
the heap unless it happens to dimension its own variables inside of the
property, and even then (except for strings and
statics) most variables inside of functions are stored on the stack.

A variable, whether global or private is nothing more than a reserved
area
of memory on the heap sized to accept a specific data type.

A variable is not a property, as you can now plainly see from the
explanation above of what a property is and what a variable is.  How can
you
possibly expect them to be or work the same.  They are different things
entirely.  The fact that the IDE displays the same icon is unfortunate
(for
you) because it causes you to have false expectations.

Stop arguing about it and accept the reality.  I didn't make the
language, I
just look at what things are and use them appropriately.

John W. Colby
www.ColbyConsulting.com

On 4/14/2011 3:43 PM, Drew Wutka wrote:
> Well VBA is a subset of VB 6.  Can you show me any documentation where

> it defines a Public statement as setting a 'field' to a class, versus 
> Property statement setting a property, in VBA?  When in the IDE, if 
> you have Public MyValue or Property Get MyOther value, both will show 
> up with the same 'property' icon in the IDE.  No declaration that
'MyValue'
> (in this case) is a 'field' in the Object browser.
>
> In .Net, it DOES have a different icon in the IDE.  Fields and 
> Properties are given completely different icons in autosensing drop 
> downs.  It makes a clear distinction.
>
> Drew
--
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
The information contained in this transmission is intended only for the person or entity 
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business 
Sensitive material. If you are not the intended recipient, please contact the sender 
immediately and destroy the material in its entirety, whether electronic or hard copy. 
You are notified that any review, retransmission, copying, disclosure, dissemination, 
or other use of, or taking of any action in reliance upon this information by persons 
or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list