Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Messagebox is not shown
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00980856
Message ID:
00980912
Vues:
44
>The display of MessageBox has nothing to do with SET NOTIFY.
>

Seems like ErrorMsg doesn't work while MESSAGEBOX() does. Go figure.
*---------------------- Location Section ------------------------
*   Library: 	Acustomcontrols.vcx
*   Class: 		Txtdate
*   Method: 	Valid()
*----------------------- Usage Section --------------------------
*)  Description:
*)

*   Scope:      Public
*   Parameters:
*$  Usage:
*$
*   Returns:
*--------------------- Maintenance Section ----------------------
*   Change Log:
*       CREATED 	01/26/2005 - NN
*		MODIFIED
*----------------------------------------------------------------
IF !EMPTY(CHRTRAN(THIS.TEXT,"/.","")) AND EMPTY(THIS.VALUE)
*This.Value=CTOD("^"+STR(YEAR(DATE()),4)+"-"+STR(MONTH(DATE()),2)+"-"+LEFT(This.Text,2))
	WAIT WINDOW "Bad girl!"
	*=ErrorMsg("Wrong date typed!")
	=MESSAGEBOX("Why would you type such a date? ")
	
*this.Value = {}
	RETURN 0
ENDIF
>I am thinking maybe the following portion of code:
>
>IF !EMPTY(chrtran(This.Text,"/.","")) AND EMPTY(This.Value)
>    =ErrorMsg("Wrong date typed!")
>   WAIT WINDOW NOWAIT "Wrong date typed!"
>   RETURN 0
>ENDIF
>
>the condition is never met, in other words, your if statement evaluated to false.
>So your message display code was never excuted. I would reexamine the statement.
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