Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Decorator pattern question
Message
De
21/03/1999 21:20:16
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
 
 
À
19/03/1999 11:38:55
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00199184
Message ID:
00200333
Vues:
8
Nancy,

Yes, the combined object would know in what order the decorators were instantiated. At that point you would need a common interface for accessing the PEMs, you're correct it would be a chain of responsibility pattern. The method could run something like this:

Check if the PEM exists in the current object, if so, run it.
If not, is the oRef property not null,
If so, call the method in the oRef object, else return an error.

HTH

Rex

>Rex-
>I'm strictly pre-newbie at design patters :), so forgive me if this question is idiotic: but don't you (and the combinded object) know what order the decorators are instantiated in given the "this.oRef.oRef.oRef.etcetcetc" hierarchy?
>
>Also, is what you are discussing essentially the chain of responsibility pattern? So that for example this.DoSomething() would look at the message (?) to see if it can handle the task. If not it calls:
>
this.oref.DoSomething(this.oRef)?
>
>I'm struggling with these ideas, so I appreciate your patience. (And YOU posted looking for help :)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform