How to Set Class property in LotusScript agent

Hi,I have developed a Lotus Script class with a Get/Set property method as shown below.

Public Class MyClass

KeyVal As String

Public Property Set Key As String

Me.KeyVal = Key

End Property

Public Property Get Key As String

Key = Me.KeyVal

End Property

End Class

Can any one please tell me how can I call this property from a Lotus script agent. I have already instatiate the object from this class. But I dont know the syntax to invoke the Set property method.

Thanks,

Jai.

Subject: How to Set Class property in LotusScript agent

Jai,

There is no special syntax:

dim MyObject as new MyClass

MyObject.Key = “hello world!”

print MyObject.Key

is perfectly valid.

Subject: RE: How to Set Class property in LotusScript agent

But when I do this, its giving me a compilation error

Not a public member: Key

Subject: RE: How to Set Class property in LotusScript agent

Because it’s not a public property you can’t access it from outside the class code no matter what syntax you use. Put the word Public in front of its definition to make it accessible to everyone.

Subject: That’s what I get for trying to answer a question that isn’t CRISPY

err… wanted this link:http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/5260e95508a2a6df8525711d00738ebf?OpenDocument&Highlight=0,CRISPY

http://www-10.lotus.com/ldd/nd6forum.nsf/0/410171d83ddba6d485256df100832aba?OpenDocument

Subject: RE: How to Set Class property in LotusScript agent

Why is the public modifier now present in the original posting? Jai, did you add it? This thread is extremely confusing to read now.

Subject: RE: How to Set Class property in LotusScript agent

I don’t think the original post has been modified. But also I don’t think we’re seeing the right code/all the code, because that’s what the error message means.