Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What would be the best way to apply logic?
Message
De
10/09/2009 13:52:08
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01423463
Message ID:
01423471
Vues:
49
This message has been marked as a message which has helped to the initial question of the thread.
>>>Hi everybody,
>>>
>>>I already built a form with all the controls using the regular VPM textbox_ class.
>>>
>>>Now, on the form I have several from / to dates controls.
>>>
>>
>>And you didn't use a re-usable container class with from/to date textboxes in ?
>>
>
>No, I didn't. At my former work I did have such a container and it took me some time to design it. In VPME we don't have it out of the box, besides, I used a form builder to put all the controls.
>
>>
>>>I'm thinking what would be the best way to add a validation logic for from/to? Does the idea of putting the logic into Ok button for the form sounds OK, e.g. don't catch the wrong dates before the final exit?
>>>
>>>This would be the easiest thing to apply then.
>>
>>
>>Maybe you can fiddle with bindevents() - but I find it clumsy
>>
>
>Agreed, so I dismissed this idea.
>
>>The quickest is to put the logic in your OK or OK.When()
>>Work with a loop that tests one pair at a time
>>
>>
>
>Exactly, that's what I decided to use with almost direct coding (call form's method for each pair).
>
>I don't like it 100%, but that's the simplest solution.



A container is reusable in other future scenarios

>
>>But a reusable container with from/to would be second to none



Update

The containers can give a warning (wait window nowait) if from > to

The OK then calls all Container.Valid(), if anyone fails it does not save


>>>Any other ideas?
>>>
>>>Thanks.
>
>Thanks again.


I was just updating and it wouldn't lt me - see in-line
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform