Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complex objects modeling
Message
De
26/11/2018 10:58:39
 
 
À
25/10/2018 23:33:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01662805
Message ID:
01663798
Vues:
87
J'aime (1)
This function is available as github project on https://github.com/nftools/underscore

Latest update allows you to create a deep structure of multiple childs at once.

See _test.prg : ( https://github.com/nftools/underscore/blob/master/_Test.prg )
*----------------------------------------------
* Create a deep object structure at once:
*----------------------------------------------
*
* instead of:
*
* oCust = create('empty')
* addproperty(oCust,'oInfo',create('empty')
* addproperty(oCust.oInfo,'address',create('empty')
* addproperty(oCust.oInfo.address.billing,'phone',create('empty')
* oCust.oInfo.address.billing.phone = 2358811
*
*----------------------------------------------------------------------
* using _( ) :
*

oCust = createObject('empty')

with _( m.oCust ,'.info.address.billing.phone')
	.number = 2358811
endwith

? 'm.oCust.info.address.billing.phone.number:'
?? m.oCust.info.address.billing.phone.number
@nfoxdev
github.com/nfoxdev
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform