Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass object to method NOT by reference
Message
From
08/07/2016 21:55:12
 
 
To
08/07/2016 17:15:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01638158
Message ID:
01638164
Views:
69
Hi Albert, you can serialize and pass your object as Json using
"nfJsonCreate" and "nfJsonRead" ( https://vfpx.codeplex.com/releases/view/620040 ),
just change 2 lines of code:

loSomeObject=CREATE("empty")
ADDPROPERTY(loSomeObject,"FileName","C:\temp\test.doc")

** loFileWhizBang.OutputFile(loSomeObject)
** changes to:
loFileWhizBang.OutputFile( nfJsonCreate(loSomeObject) )

*** and method Outputfile ***

LPARAMETERS toFileObjectAsJson

**** Json string back to vfp object:
toFileObject = nfJsonRead( toFileObjectAsJson )

* strip the path off for some use
toFileObject.FileName = JUSTFNAME(toFileObject.FileName)

****

Marco Plaza
@nfoxdev
github.com/nfoxdev
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform