Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Prevent a Form loading?
I have a form which, in its init method, checks to see if the conditions exist which make it worth loading the form. If not, I don't want the form to continue loading. Trouble is, I can't seem to stop it!
I started with
if (condition)
(warn user that the form can't be loaded)
thisform.release
endif
after that failed I tried
if (condition)
(warn user that the form can't be loaded)
thisform.release
nodefault
endif
and then
if (condition)
(warn user that the form can't be loaded)
thisform.abandon && a property set up for this purpose
thisform.release
nodefault
endif
followed by these opening lines in both the load and activate methods
if thisform.abandon
thisform.release
nodefault
endif
I even tried setting the form visible to false and then only setting it true if the condition was met. Made no difference whatsoever.
They all yield precisely the same behaviour. The warning comes up for the benefit of the user, then the form displays regardless. I say 'displays' because the form refuses to react to any button pushing, as though it has been partially released. However, as it is 'alwaysontop' I can not then do anything with any other forms and am forced to crash the program to get rid of the damn thing.
Presumably I'm missing something elementary. Could someone please put me out of my misery!
Harry
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