Information générale
Catégorie:
Programmation Orientée Object
>>>I am trying to implement an Observer object to send messages to objects on a form. The problem is that after I Subscribe my object to the Observer and then try to close the form on which the object exists, the form won't close. I assume this is because the Observer still has a reference to the object. I have tried releasing the object reference (from the Observer) in the objects Destroy method, but that didn't work. Where and how should the object "Unsubscribe"?
>>Steve,
>>Just for ease, before form.release, removeobject observer.
>>Cetin
>
>The Observer object is part of my application object. I must be able to send messages not only to objects within a form, but from an object on one form to an object on another form.
I wonder if you would be better off creating these objects as separate entities prior to running the form.
Dan
Précédent
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