Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Holding the name of a control as a string?
Message
 
À
04/03/2002 16:21:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00628023
Message ID:
00628114
Vues:
22
OK really tearing my hair out - wasted a whole evening on this...

Basically I am trying to trap the user into saving or undo their changes...

I have a top level form with a tree view in it that provides my menu structure and if the data hasn't changed in the form the user can launch another form without the annoying "please close this form" message - I only want to trap them if they made changes...
local lnAnswer, strControl, loControl

if thisform.mDataChanged()
lnAnswer = messagebox('     Please Save or Undo changes before launching another screen...          ', ;
0 + 64 + 0, 'System Message')
return
endif
That works OK once! If the user exits the form stays open but if they click the treeview again the form closes and the changes are lost...

Putting in the focus to the last control causes the lost focus to fire twice and even then if the treeview is clicked the form shuts down just the same - changes lost...

Please if you have any ideas...
Chris Maiden
Email
Web
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform