Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Good question
Message
 
 
À
09/04/2013 03:48:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01570404
Message ID:
01570508
Vues:
41
>>Hi everybody,
>>
>>I need to implement the following functionality:
>>
>>Cancel button (and clicking on the Close x button at the top of the form will prompt in case of unsaved changes and let the user to save them or really close/cancel – note, this behavior is non-standard to other application forms where Cancel just cancels without any prompts).
>>

>>So, this is the question I added (see attached), but I am not sure I like it. I am wondering how should I phrase this prompt question - can you please suggest?
>>
>>Thanks in advance.
>
>The user may have hit the close by accident
>
>I'd go for Save changes : Yes - No - Cancel with the default on the Cancel button
>
>yes = save and exit
>No: disregard changes and exit
>
>Cancel : disregard the Close x and continue whatever I was doing

I was looking for the exact wording. This is what I currently have but I don't like it also as right now the Yes and No are reverse. I can leave it like this and let the tester tell me if it's OK or not and how to change it or keep playing with it:
if vartype(m.tcMode) = 'C' and m.tcMode = 'Close'
		lcQuestion =  "You have unsaved changes. Do you really want to close this form without saving?"
	else
		lcQuestion = "You have unsaved changes. Do you really want to cancel them?"
	endif
	if messagebox(m.lcQuestion,4 + 32 + 256, 'Cancel Changes') = 7 && No - we want to save changes
		if not thisform.save()
			llReturn = .f.
			nodefault
		endif
	else
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform