Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put code for calculated properties?
Message
De
31/01/2001 16:30:47
 
 
À
31/01/2001 16:24:22
Mike Mattos
Nationwide Computers
Mississauga, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00470214
Message ID:
00470927
Vues:
43
>Erik, did you really mean METHODS , or just a generic for UDF's ?
>

I meant methods. But this is because I organize my business code into objects. I only create UDFs for functions that are business generic. (IOW, functions that could have come with VFP, but didn't)


>Methods drive me crazy with "only vaild within a form" failures, etc, too much work when all I need to do is figure out the sales tax !

If you're programming in an object, THIS.CalculateTax() is easier than

SET PROC TO Whatever
lnTax = CalculateTax()

As far as 'failures', I suppose those are coming from trying to mix objects with your old procedural habits.

>OTOH, I'm here to learn better ways, so if I'm missing something, let me know!

You are. OO programming takes a little while to catch on to, but once you've caught on, you'll never go back. You'll find that your code is better organized, more flexible, and easier to read/debug. You might want to look at Markus Egger's book on OO programming with VFP. I haven't read it, but from what I understand it often turns the lightbulb on for people.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform