[AccessD]

Bruce Bruen bbruen at bigpond.com
Fri May 16 10:05:13 CDT 2003


Doh! (Bashes head against keyboard repeatedly) Doh! Doh!

Thanks folks,  I should have been looking at the code - NOT the error
message.  

However, re Bryan's comment - why can't the attribute value setting code
be private - fundamentally it's an attribute that <u>cannot</u> be
updated via this interface, but it does need to be visible to users of
the class.  In this case the clubname is retrieved internally in the
class - it is a header for the object.

I don't believe that the public get/private let construct is
syntactically incorrect.  However, is it philosophically incorrect?  I
could just set the class variable directly I suppose, in the class logic
that retrieves the clubname from the database. But surely that gets away
from the idea of a single  update point for the attribute/class
variable.

FYI, the class is intended to support an object which is a list of teams
submitted to a sports league for inclusion in a seasonal competition.
The user can manipulate the list part to their hearts content, adding,
changing, deleting teams until they are happy.  They then use a
"transmit" operation that generates an XML doc of the list and sends
that to the league.  The XML doc is structured as follows:

<XML blahblah>
	<header>
		<Sender name="their_usersname", id="their_digitalsigid"
/>
		<Club name="the clubname of the users club" />
	</header>
	<teamlist>
		<team name="PigRooters" grade="veterans" />
		<team name="Assassins" grade="Under8" />
		... Etc
	</teamlist>
</XML blahblah>

So, that is the reason the clubname is readonly for this particular
interface, we don't want users having any chance of changing the club
identifier (the club name).

Anyway, thanks again for taking the time to point out the obvious error.

Rgrds
Bruce
		

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco
Sent: Friday, May 16, 2003 10:37 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD]


Could it be from using Set to assign a String?  Try using a Property Let
instead (without the Set statement).

Jim DeMarco

-----Original Message-----
From: Bruce Bruen [mailto:bbruen at bigpond.com]
Sent: Thursday, May 15, 2003 8:05 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] 


Dear List,

Given the following is as simple as it looks,  can anyone shed any light
on the compile error that it generates?

Option Compare Database
Option Explicit
Private mstr_clubname As String

Private Property Set clubname(ByVal iname As String) <<<<----------error
here! ''set the attribute with the supplied name of the club
        Set mstr_clubname = iname
End Property

''returns the value of the clubname attribute
Public Property Get clubname() As String
        clubname = mstr_clubname
End Property


The compile error is "Definitions of property procedures for the same
property are inconsistent or contain optional parameters or a
ParamArray"

Not according to this little black duck!  I've even asked a colleague to
read the help file item on the error and she cant understand a word of
it either, not that I believe it applies in any case.  However, I have
deleted EVERY other pice of code in the class module and the error is
still there.

Tia
Bruce






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


************************************************************************
***********
"This electronic message is intended to be for the use only of the named
recipient, and may contain information from Hudson Health Plan (HHP)
that is confidential or privileged.  If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution or use of the contents of this message is strictly
prohibited.  If you have received this message in error or are not the
named recipient, please notify us immediately, either by contacting the
sender at the electronic mail address noted above or calling HHP at
(914) 631-1611. If you are not the intended recipient, please do not
forward this email to anyone, and delete and destroy all copies of this
message.  Thank You".
************************************************************************
***********

_______________________________________________
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