Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Screen Level Valid
Message
De
28/07/1997 21:19:36
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00041505
Message ID:
00042047
Vues:
37
>The problem is that you have the GATHER MEMVAR code executed before the
>CLEAR READ code, and thus it is saved before it is checked.
>
>1) Remove the GATHER MEMVAR code from the Save button
>2) Have a check for the {Esc} key in the READ VALID, thus:
>
>if mod(readkey(),256) # 12
> * Esc was not pressed, proceed with validation
>endif
>
>> In Foxpro 2.6 for Windows. I am trying to have a screen level
>> validation
>> that checks some things before the screen closes. I entered a logical
>> statement into the screen valid section of the screen generator. I
>> also
>> have some buttons ( for example a save/exit button).. The save exit
>> button contains:
>>
>> GATHER MEMVAR
>> CLEAR READ
>>
>> When the save exit button is pressed the screen level validation
>> clause IS
>> NOT executed
>>
>> When I press ESC to exit the screen the screen level validation IS
>> EXECUTED

@ 1,1 get m.dummy default " " valid myudf()
read valid .F.
? "read terminated without validation of .F."

function myudf
clear read && read valid won't be fired

It doesn't matter what you do before or after a clear read when a clear read follows @... get statements. This "read valid" will never be executed but a foundation "read valid" will.
Ç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