Click here to get back home

Class: method or internal procedure ???

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Class: method or internal procedure ??? Laurie 05-17-2007
Posted by Laurie on May 17, 2007, 11:43 am
Please log in for more thread options
Hello,

This is probably more of a design question rather than a specific question
about vb6.

I’m creating a class module with a number of property let and property get
variables. The property let variables are used in a fairly complex spring
formula and the output will be property get variables.

e.g.

Public Property Let TubeODInMM(TubeODInMM As Single)
vTubeODInMM = TubeODInMM
End Property
Public Property Let CurtainSectionThkInMM(CurtainSectionThkInMM As Single)
vCurtainSectionThkInMM = CurtainSectionThkInMM
End Property
Public Property Let CurtainWidthInMM(CurtainWidthInMM As Single)
vCurtainWidthInMM = CurtainWidthInMM
End Property

Public Property Get TorqueClosed()
TorqueClosed = vTorqueClosed
End Property
Public Property Get TorqueOpened()
TorqueOpened = vTorqueOpen
End Property
Public Property Get RadiusClosed()
RadiusClosed = vRadiusClosed
End Property
Public Property Get RadiusOpened()
RadiusOpened = vRadiusOpened
End Property

From a design point of view, is it better to let the user of the object set
the input properties; execute a GetSpring() method and then read the output
properties .e.g.

Dim objSpring as New clsSpring

ObjSpring.TubeODInMM=127
ObjSpring.CurtainWidthInMM =2400
Etc.
ObjSpring.GetSpring()
VRadiusClosed= ObjSpring.RadiusClosed
VRadiusOpened= ObjSpring.RadiusOpened
Etc.

or set the input properties and automatically run internally in the object
the GetSpring() procedure when the user selects a output property e.g.

Dim objSpring as New clsSpring

ObjSpring.TubeODInMM=127
ObjSpring.CurtainWidthInMM =2400
Etc.
VRadiusClosed= ObjSpring.RadiusClosed
VRadiusOpened= ObjSpring.RadiusOpened
Etc.

Inside the class
Public Property Get TorqueClosed()
        Call GetSpring()
TorqueClosed = vTorqueClosed
End Property

Thanks


Similar ThreadsPosted
Device Driver Installation Procedure June 7, 2005, 8:21 pm
Is there any procedure to make a MTC call on pocket pc phone emula April 3, 2007, 1:06 am
Internal GPS July 6, 2005, 8:56 am
Connect to internal GSM in Pocket PC September 29, 2006, 12:07 pm
VS 2005 Beta 2 period is over - what is the advised procedure for upgrading to VS 2005 Standard Edition? May 16, 2006, 1:44 am
Work with internal GPS on HTC Kaiser without GPS Intermediate Driver May 30, 2008, 10:42 am
IME (Input Method) question? June 22, 2005, 1:15 pm
No method Image.FromStream April 13, 2006, 7:49 am
Can we use Graphics out of Paint method? November 19, 2007, 2:04 am
GetBytes() method in OPENNETCF's SDF February 10, 2008, 8:16 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap