Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Complex objects modeling
Message
From
26/11/2018 10:58:39
 
 
To
25/10/2018 23:33:01
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01662805
Message ID:
01663798
Views:
86
Likes (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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform