Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to: Create a New Method like .AddProperty
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00950263
Message ID:
00950641
Views:
15
Mark,

It doesn't work here...

Using VFP 9.0 Beta (Build 1720), I get an error:

Function argument value, type, or count is invalid.

I've tried using oObject.WriteMethod(), oObject.AddProperty() and the function AddProperty().

What is your VFP9 version?




>>Hi Mark,
>>
>>... and if you go to VFP9, WriteMethod and AddProperty have 2 additional parameters that allow you to specify the visibility of the Property or Method (e.g., Public, Protected or Hidden) as well as a parameter to provide a description.
>>
>>I try to find something about it in VFP9 help... But nothing there...
>>Maybe this feature isn't documented yet...
>>
>>Could you give me an example?
>
>WriteMethod('MyMethodName', 'code here', .T., nVis, 'description here')
>
>nVis = 1 for Public, 2 for protected or 3 for hidden
>
>The 3rd parameter is .T. if the method needs to be created, .F. if the method already exists. My experience has been that if you pass .T. and the method already exists, no error is generated, and the code is still written to that method.
>
>AddProperty('PropName', 'prop_value', nVis, 'description here')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform