Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Good question
Message
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:
01570436
Vues:
55
>>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.
>
>How about:
>
>MESSAGEBOX("Do you want to Save changes?",4+32,"Save")
>
This is the first time I have ever reacted to one of your posts in a negative way. Please understand that I think you are one of the most knowledgeable and helpful people here. There are some people whose posts I automatically read even if the thread doesn't seem interesting, and you are one of them. And this isn't a huge deal, more a matter of programming style. Soooo .... I have a major pet peeve about the use of "magic numbers" in code, including in MESSAGEBOX() calls. I always include FOXPRO.H in modules that call MESSAGEBOX(). Isn't this clearer?

MESSAGEBOX("Do you want to Save changes?",MB_YESNO+MB_ICONQUESTION,"Save")

You may have all the values memorized but what if your code winds up in the hands of someone who doesn't?

PS -- It was nice of them to name all the values after me ;-)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform