Re: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Hans Wichman
it only gets worse :) This is a nice read too: http://www.moserware.com/2008/03/what-does-it-take-to-become-grandmaster.html On Thu, Mar 20, 2008 at 11:08 PM, Jiri Heitlager < [EMAIL PROTECTED]> wrote: > Steven, > > thanks for that helpfull reply. It is funny becuase I was just thinking > about

Re: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Jiri Heitlager
Steven, thanks for that helpfull reply. It is funny becuase I was just thinking about the dualism, on the one hand there are these wonderfull elegant design patterns that supposed to make things easier and on the other hand it seems like coding has just became harder ever since when I started

RE: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Kerry Thompson
Steven Sacks wrote: > Your initial hunch is that your problem would best be solved by the > Decorator pattern, but it very well may not be. The Decorator pattern > has fallen out of favor in recent years, as many people believe it > violates good OOP practices. It has its uses, but they're limit

Re: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Steven Sacks
"What you're experiencing is premature enlightenment." - Tyler Durden The Gang of Four specifically warns about this, and it's important to acknowledge that it's happening. When people first learn about design patterns, they will immediately begin looking for places to apply them. They will

Re: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Jiri Heitlager
Meinte, i have been doing that for the last 4 years and I am not saying you are wrong, but I get the feeling that I am reinventing the wheel every time. Why not use patterns that have been developed over the last n years and as a result get better maintainable code. I just dont have that god g

Re: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Meinte van't Kruis
it's better to code and accidentally discover you've used a design pattern, than beginning to code thinking you have to use a specifick pattern, but that's just my humble opinion. On Thu, Mar 20, 2008 at 6:08 PM, Jiri Heitlager < [EMAIL PROTECTED]> wrote: > I could use another design pattern, but

Re: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Jiri Heitlager
I could use another design pattern, but I need to figure out which one then. The application is one where the user can selected certain items and those items are put on a canvas. Then when the user selects the item on the canvas, a panel shows up that allows the item to be rotated, scaled and p

Re: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Cory Petosky
That's not really how Decorator is meant to work. You could hack around it by exposing the decorated instance in your Decorator interface, digging down to it, and using a bunch of instanceof calls to figure out which is which. I really don't recommend this, though -- instead, use a different desig

[Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Jiri Heitlager
Hello List, i am looking into the decorator pattern for an upcoming AS2 project. I was wondering if the following is possible var com:Component = new Component() com = new decoratorA(com) com = new decoratorB(decA) com = new decoratorC(decB) I cant seem to figure out what I need to do in order