Hi All
In a WD class you create a property. Does WD have set and gets internal methods. In VB or C# you create a property and you will also be able to declare a set and a get for the property. And when assign a value to the property the set would run automatically. So in the set method I could write code to change the value of what was assign to the variable. I didn't have to call the set method of the property. Anytime a new value was assigned to the property it would run. Anytime anything would read the value from the property the get method would run automatically. They are called the get and set of the property. WD has a Writes and Reads method you can create for the property but they do not run automatically when a value is read from or assign to the property. You can call these Writes and Reads manually. How do you get the Writes and Reads methods of the property to execute automatically. If this can not be done then these Writes and Reads are no more useful than just writing my own methods. Or am I not doing something right. Here is my code :
Entrie is class
myValis string
End
PROCEDURE Reads_myVal() <-- generated by WD I put the Upper function call in
RESULT Upper(:myVal)
PROCEDURE Writes_myVal(NewValue) <-- generated by WD I put the Upper function call in
:myVal=Upper(NewValue)
WD generated these 2 methods as access methods. And I just changed them to make the property upper case. So when I go:
var1 is object dynamic = new Entrie
var1:myVal = "john marrone"
and when I do => info(var1:myVal) I should get an info message box with the string "JOHN MARRONE".
Can WD do this like other programming languages do. Or is WD just writing template code to save us some effort. In WD when you right click on a property in the class panel in the code panel WD gives you a popup menu option to generate the access methods for the property. And when you select it WD generates the Writes and Reads methods like the code above.
I hope someone understands what I am saying here. Could someone let me know one way or the other. And if WD does have this feature what I am doing wrong. This is very important to me so if someone could, please help