Return to Home Page
      Blog     Consulting     Seminars     Calendar     Books     CD-ROMS     Newsletter     About     FAQ      Search
 

ShapeFactory.addFactory() is never called in your code.
If it was, it would not work:

ShapeFactory.factories.put[id] = shapeFactory

There is no dict.put method.

Each time you exercise the code you are actually registering the concrete factory within:

ShapeFactory.createShape().

This works, but a check should be made that that the supplied factory is is a subclass of Shape.

--Albert

f  e  x



Add your comment below. Use an empty line between each paragraph. Paragraphs will be automatically formatted, and single carriage returns will be respected. Use <code> to begin a code block, and </code> to end a code block. Your email address will not be visible to spam harvesters or used in any way except to contact you with further questions.

Your Email Address:

Search     Home     WebLog     Consulting     Seminars     Calendar     Books     CD-ROMS     Newsletter     About     Contact     Site Design     Server Maintenance     Powered by Zope
©2007 MindView, Inc.