Phil Schumm wrote:
Thanks. Alternatively, you can use a factory function that takes
arguments, and returns a fresh instance of the class suitably
initialized (i.e., based on the arguments passed to it). That's what
I wound up doing in this case.
----------------------------------------------------------------------
Good that you could find a workaround for your situation. A simple
factory is handy, but it really doesn't give you what the ability of
a constructor to take arguments does. There are situations where a
simple factory can't serve as an alternative to passing arguments to
constructors, for example, try implementing a singleton design
pattern in Mata (not that typical Mata usage needs a singleton).
Joseph Coveney
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/