Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Always Returns True
Message
De
21/05/2001 11:26:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/05/2001 11:15:04
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00509475
Message ID:
00509490
Vues:
20
This message has been marked as a message which has helped to the initial question of the thread.
>The following call to a modal form always returns true regardless of the what is being set in the form. The variable lOk is public and is only used as shown below. I know setting lOk in the Valid is superfulous, but the return by iteself wasn't working and I was grasping...
>
>DO FORM OkNo WITH 'Help does not exist for this. Do you wish to add it?' TO lOk
>
>(In Valid method of CommandGroup in OkNo form):
>
>IF This.Value = 1
>lOk = .T.
>Return .T.
>ELSE
>lOk = .F.
>Return .F.
>ENDIF
>
>I've stepped through the code and the ELSE condition is being run and lOk evaluates to .F. during the Valid. In fact, the only time lOk evaluates to .T. is on the line following the DO FORM call after returning from the OkNo form. I thought it might be variable scoping, but I haven't been able to find anywhere that lOk is being set to anything other than False. Any thoughts? Thanks!
>
>Regards, Renoir

Renoir,
When you use :
do form with ... to m.RetValue

m.RetValue is modal form's unload event's return value. If you have nothing in that method you'd get default return value .T. as expected.

In commandgroup valid only set return value and return that value from unload event.
*Commandgroup valid
thisform.tag = transform(this.value=1)
thisform.release

*Form unload
return eval(this.Tag)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform