Information générale
Catégorie:
Programmation Orientée Object
David,
I have experimented with this and although you can drop other objects onto a container I have not found how to control the order in which they are created/initialized. Am I missing something or should I not be designing my objects to depend upon a load order?
For example I have created an application class and I have dropped eventlog, screen, environment, version, security and user instances onto it. These objects need to share information between each other that could be obtained when they are initialized if it were done in the right order otherwise I have to finish initializing the objects in the Init method of the application class by calling a seperate method in each child object (.User.setUser(),.Version.setVersion()).
I this is the preferred method then I can live with it but I am tempted to define my application class in a .PRG so I can order them as I like. What is you approach?
...tim
>Tim,
>
>The only real difference is if you are using the Class Designer you can not drop other objects into a Custom class at design time. They can only be added at runtime using the AddObject() method. Container derived objects also have a visual appearance at runtime whereas Custom does not.
>
>>While browsing various class libraries I noticed the use of the container where I would expect a custom class. Could you explain the advantage of this?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement