Wiki Home

Access Method Weirdness


Namespace: Wiki
I have a problem with properties not displaying the correct value when I have an AccessMethod associated with it. BTW this is a PRG based class.

When I observe the property with the debugger it is fine, when I try to do anything outside the class it always returns a logical. Example:

object.property = 'A'
? object.property

.T. is printed on screen
Debugger says object.propery = 'A'

If I take out the AccessMethod for that property and run the same code, 'A' is displayed on screen.

Any help would be greatly appreciated. Let me know if you need any more details.


You should look this up in the VFP docs, here's the example there:
   PROCEDURE MyProperty_ACCESS && Access method
      WAIT WINDOW 'This is the Access method';
          +  ' ' + PROGRAM( )
      RETURN THIS.MyProperty
   ENDPROC

-- Mike Helland

Thanks, I did look at the docs, but breezed right over the return statement. As my momma used to say, "If it was a snake ....."
--- Rodney Dixon

Rodney Dixon
Category Access And Assign Category Questions Closed