Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Good question
Message
 
 
To
08/04/2013 16:24:13
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01570404
Message ID:
01570420
Views:
36
>>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.
>
>
>LOL! Very funny phrasing. :-)
>
>Most developers use something like "Leave page and lose changes? Yes, No"

I decided to go with Michel's suggestion and currently have this
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
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform