Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: static variables
|
Posted: Nov 26, 2002 2:05 PM
|
|
A factory creates objects for you, so that you don't have to be too tightly coupled to the exact type of object. I'm not sure why you would need a factory for what you've mentioned here.
Really a wizard is just a substitute for a large dialog box; it is just a tool to keep the user interface a little simpler and cleaner and to provide a sense of order to the user. In the end, it is just collecting a set of choices from the user and then acting on that information.
I'm not sure how you have all your stuff structured, but if the panels are inner classes of a main frame that has the context information of your app (a reference to an object) then they should be able to pass the information directly. Alternatively, a reference to an object could be passed from panel to panel. This object could either be a settings object, or the actual object that does the work of your app, depending upon which gives you a better design. One of the benefits of using a settings object is that you can easily pre-configure it via a text file, which will facilitate the unit tests (which you've already written, of course).
|
|