ba272
asked on
How do I create an interface which is added at runtime
Hi,
I need to conditionally add an interface to an object which will add certain capabilties when the program loads. So if the program needs to load in one way, the interface will not be used. In another way it will be added.
Is this possible?
Thanks,
Bob
I need to conditionally add an interface to an object which will add certain capabilties when the program loads. So if the program needs to load in one way, the interface will not be used. In another way it will be added.
Is this possible?
Thanks,
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think this concept of a decorator class might be what I need. I'll explain in a little more detail here.
I have an order object, which has quite an extensive amount of code in it, and is complete when my program operates in conjunction to a given point of sale system (POS). But in order to modify the interface for a new POS I need to add a few more properties to the Order object. But I don't want to be sloppy down the road, when creating an interface to a third POS by accidentally mis-using these properties, which are reserved for this new POS.
So I have altered my database properties to describe the POS name to use, so while loading, my program has the ability to dynamically adjust to various POS's.
Is this a proper use of a Decorator class?
Thank for the help,
Bob
I have an order object, which has quite an extensive amount of code in it, and is complete when my program operates in conjunction to a given point of sale system (POS). But in order to modify the interface for a new POS I need to add a few more properties to the Order object. But I don't want to be sloppy down the road, when creating an interface to a third POS by accidentally mis-using these properties, which are reserved for this new POS.
So I have altered my database properties to describe the POS name to use, so while loading, my program has the ability to dynamically adjust to various POS's.
Is this a proper use of a Decorator class?
Thank for the help,
Bob
ASKER
I wonder if I wouldn't be better off simply overriding the Order object and only instantiating the nw type when using the new POS.
I guess I overlooked the most typical way to solve this problem. Thanks.
Bob
I guess I overlooked the most typical way to solve this problem. Thanks.
Bob
Jono