From: Steve F. <st...@m3...> - 2003-03-10 21:39:53
|
This is partly a problem with the language, which won't let us override=20 on the class side. That said, one of the points of MO is to push you to do the Right Thing.=20 In this case, many of us believe that this sort of static method just=20 gets you into trouble and should be on the instance side, so wrapping it=20 up is a step in the right direction. S. DeS...@em... wrote: > I think you are out of luck. In this case, I would try to refactor > MyBackEndClass so I can call an instance method. I suspect MyBackendCla= ss > implements some interface like MyBackendInterface, otherwise you wouldn= 't be > able to mock it. My approach would be to decouple the retrieval of the > back-end object from the method that uses this object. Something like t= his: > [...] --=20 [Advert: Come to http://www.ot2003.org] "What=92s the difference between a C programmer and a LISP programmer? A=20 LISP programmer knows the value of everything but the cost of nothing.A=20 C programmer knows the cost of everything but the value of nothing." (Todd Proebsting) |