Information générale
Catégorie:
Codage, syntaxe et commandes
>Does anyone have code that can test for the existence of a class object from within a method of another class object? For example lets say that I create a LAST command button as an independent button. I want it to perform its normal function of going to the last record, this is easy, but I also want it to test for the existence of a NEXT button and If it exists disable it. I know this is easy if you create a container and let the container control what happens. But for purposes of theory, lets say we cant or wont use a container. Since theoretically, these two buttons will be used alot they are to be created as classes. So again, how do I test for the existence of another class object?
if 2 objects are not contained together in a container of some sort
they shouldn't know anything about eachother
let say u can check if another object exist (I think this shouldn't be a problem using the TYPE command btw) what would be the path you would search it in
also disabling another nonrelated object violates encapsulation
Arnon
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