Is there a good way to do this? I don't have the source in front of
me, so I have the class names wrong but hopefully my explanation will
be clear. According to the web tutorial, in order to create a new
Decorator, you need to extend the BasicCommandSomething.. It's the
class that understands how to create an object based on it typeID. A
new decorator has a new typeID, thus the default implementation does
not know how to deal with it. The problem is that in a module
extension, I can't replace the default one, because that is defined in
the module.
What I ended up doing was using reflection to bypass access
restrictions in GameModule and replace the "BasicCommandSomething"
with my version, and that just feels ugly and horrible.
So is there a better way to do this? Is there some reason
ModuleExtension should not declare Decorators?
In case anyone is wondering the decorator is: I intended to scale the
underlying Piece down to the desired size. That way when a zoom is
performed it does not generate image data, instead if uses more of the
underlying piece image. This allows for the creation of small pieces,
with highly detailed zooms.
So has any one else done this, and can they point me to where. I'm
close to getting it working, but it's been a pain.
Thanks much.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vassalengine/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/vassalengine/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/