see
Re: _COMATTRIB attributes have no effect Thread #
685958 Message #
685975>Hi!
>
>Just defined my first COM-server with read-only property like:
>
>#include foxpro.h
>
>DEFINE CLASS myclass AS SESSION olepublic
> * Define property
> MyProperty = "Test"
> * Only set the nFlags attribute for MyProperty
> myproperty_comattrib = COMATTRIB_READONLY
>ENDDEFINE
>
>
>I create a server object with CREATEOBJECT() :
>
>oTest = CREATEOBJECT("myapp.myclass")
>
>
>I still can modify MyProperty value on client. What's wrong?
>
>Of course I can protect the property using COMRETURNERROR in assign method but why I need to do so? Is it a bug? (I use VFP8SP1 on WinXP SP1)
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison