Hi,
While refactoring a class, it occured to me that one method would actually benefit from taking arguments rather than using attributes which would need to be set via accessor methods before the protocol method could be called.
How do you decide when to use attributes for public class method fucntionality vs methods which accept parameters?
Is there a rule that says protocol (public) methods should always work with attributes and not take arguments?
Is it simply a case of what is easiest to work with for a particular action?
Now perhaps in a true OO languages; as you have a contructor (which you don't in Access), you can overload them with various parametised signatures, which would set attrbutes as the object is instantiated, but as there is no contructor that takes arguments nor can it be overloaded in Access, it makes initialising attributes via a contructor impossible.
Though correct me if I'm wrong, but as understand things all you get in Access is "Private Sub Class_Initialize()" which takes no arguments and cannot be overloaded?
All input is appreciated.
Regards,
1DMF.
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Dance Music Downloads
While refactoring a class, it occured to me that one method would actually benefit from taking arguments rather than using attributes which would need to be set via accessor methods before the protocol method could be called.
How do you decide when to use attributes for public class method fucntionality vs methods which accept parameters?
Is there a rule that says protocol (public) methods should always work with attributes and not take arguments?
Is it simply a case of what is easiest to work with for a particular action?
Now perhaps in a true OO languages; as you have a contructor (which you don't in Access), you can overload them with various parametised signatures, which would set attrbutes as the object is instantiated, but as there is no contructor that takes arguments nor can it be overloaded in Access, it makes initialising attributes via a contructor impossible.
Though correct me if I'm wrong, but as understand things all you get in Access is "Private Sub Class_Initialize()" which takes no arguments and cannot be overloaded?
All input is appreciated.
Regards,
1DMF.
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Dance Music Downloads