Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put code for calculated properties?
Message
De
31/01/2001 17:33:11
Mike Mattos
Nationwide Computers
Mississauga, Ontario, Canada
 
 
À
31/01/2001 16:30:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00470214
Message ID:
00470984
Vues:
51
My problem is that the calculation isn't obviously part of THIS.

eg

sales_tax(), called by quote, sale & return forms but needs an environment or a parameter or two such as STATE , Tax Code, price

I don't want to maintain 3 methods, so I currently add a .prg to the project.

I think you are saying to create an object holding sales_tax() and other methods, but that seems a lot more work than just adding the .prg to the project!

( ASIDE I use ExamDiff & FileFind to scan my .prg's , I haven't figured a way to do the same with embedded methods )

this.my_library.sales_tax() instead of SET PROC to my_library is better, I agree, but does it bloat the .exe ? Adding just the minimum necessary .prg's seems to create the smallest .exe, at least with my skills it does!

I try to avoid procedure files now, as it is getting to be a nuisance to maintain them rather than just hook the project back to the code! As I start to COM more, my projects get smaller , so adding a couple of .prg's seems most expediditious.

OTOH, if I can just grab the routine form an object and not have megabytes of code get into my project, I'd love it!

thx for the insight

mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform