Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OOP design
Message
De
06/06/2003 09:32:09
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00797072
Message ID:
00797201
Vues:
17
Hi,
Ya, i have a field called itemtype to keep the item type. I just wondering how to use OOP to minimize the code on UI/business logic layer

ex.
Form.CollectData
*--Collect common data
DO CASE
CASE itemtype = "NORMAL"
CASE itemtype = "SERIAL"
  oBO.oData.SerialNo = THISFORM.txtSerialNo.VALUE
CASE itemtype = "MATRIX"
  oBO.oData.ColourCode = THISFORM.txtCOlourCode.VALUE
  oBO.oData.SizeCode = THISFORM.txtSizeCode.VALUE
ENDCASE

*---
I would like know, anybody have ideas on minimize the use of DO CASE in all methods using OOP?

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform