Hi there,I got a “family” of LS classes:
Class myBaseClass
Class myTallClass as myBaseClass
Class myFatClass as myBaseClass
Class myShortClass as myBaseClass
… etc …
I have a factory:
Class myBaseFactory
Function getBaseClass(strClassName as String) as my BaseClass
Select Case strClassName
Case “myTallClass”
Set getBaseClass = new myTallClass
Case “myFatClass”
Set getBaseClass = new myFatClass
…
Case Else
Set getBaseClass = new myBaseClass
End Select
End Function
End Class
So far so good. Whenever I introduce a new family member I need to edit the factory. Is there a way that I could instantiate a family class soley based on the name (and intercept a potential “class-not-found” and return the baseclass then?
(I know I’ve done too much Java lately)
Thx for helping!
stw