[Gambas-user] Methods on a property?
adamnt42 at ...626...
adamnt42 at ...626...
Mon Oct 31 04:31:40 CET 2016
Probably a dq, but..
Is it possible to write a method, apart from _read and _write, on a property of a class? Specifically, I'd like to implement a boolean function to return true if the property has a specific value. Something along the lines of MyClass.MyDateProperty.IsFuture() which would return true if the current value of the property is a date in the future?
There are obvious solutions along the lines of If MyClass.MyDateProperty>Date(Now()), I'm just trying to shortcut coding common checks in the client class.
regards
Bruce
--
B Bruen <adamnt42 at ...3379... (sort of)>
More information about the User
mailing list