Mike Yearwood
Toronto, Ontario, Canada
>>Not at all. I said leaving the properties on such a public object public is no better than public variables.
>
>In other words, in order to use constants in the application you would have to do something like
>
>PI = oGlobal.GetPI()
>...
>
>Sounds inconvenient to me.
>>Not at all. I said leaving the properties on such a public object public is no better than public variables.
>
>In other words, in order to use constants in the application you would have to do something like
>
>PI = oGlobal.GetPI()
>...
>
>Sounds inconvenient to me.
Hi Naomi
mdot is "inconvenient" to some people. Tieing yourself to the building while working 12 stories up is "inconvenient" to some people. Wearing safety goggles while working with power tools is "inconvenient" to some people. ;)
Let's use your example though.
?pi() is IMO the ultimate way to get PI. Except that following is inconvenient:
LOCAL m.lcSetDecimals
m.lcSetDecimals = SET("DECIMALS")
SET DECIMALS TO 18
?PI()
SET DECIMALS TO &lcSetDecimals.
Which is more inconvenient?
PI = oApp.GetPublic("PI")
That kind of call opens up more flexibility in the design. GetPublic can be standardized and overridden. It can hide the complexity of a parameter object or whatever. I don't think there's a need to have one get and set method per variable, do you?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only