Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To reuse, or not to reuse
Message
 
À
07/12/2005 15:18:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01075864
Message ID:
01076455
Vues:
27
>A major change of style for me, but I think my old habits and ideas about code are ripe for replacement at this juncture.
>
>Thoughts?

You're still young - almost old enough to "tip" a stein legally!:-)

You'll have no problem. If you're using DBFs and Cursors - stay away from DBCs, data environment objects, SET FILETER and SELECT into cursor. Refresh and Requeries are for sissies and grandmothers. Avoid go-to. SCANS are faster than WHILE - but tricky and maybe not reliable for compleex control loops.

Create and keep objects for reuse - that means avoid "NEWOBJECT".

Structure toggable table heirarchies with single and multiple field indexes tagged to a CDX. Open all your tables at the top of the APP and use SEEK, hard bindings (mycontrol.value=myDBF.field). Clear with mycontrol.value=""

ALL KEY FIELDS should be character data. Numeric keys should be strings right padded with leading Zeros.

Don't forget SET EXACT OFF. When Asking the question if a customer has an invoice on file with the keyfields "cust_id+invoice", set exact off and just search on the cust_id.

Avoid using grids for data entry. You might also consider tossing that last little add-on you decided to keep.

If you want to train your brain - get a copy of Dbase II - spend a month or 2 writing a simple interface. Make it sexy. Make it beleivable.

I am sure there is more - but I am not as young as you and burn most of my cognitive energies trying to remember where my "drool" cup is!:-)

T
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform