The WP Get data context command returns the data context of the wpDoc document. Data contexts are defined using the WP SET DATA CONTEXT command.
In wpDoc, pass the 4D Write Pro document whose data context you want to get.
You can get a data context from a document and reuse it in another method within the same process.
The following method sets a data context:
var $person: Object
var $wpArea : Object
$wpArea:=WP New()
$person:=New object()
$person.firstName:="John"
$person.lastName:="Doe"
WP SET DATA CONTEXT($wpArea;$person)
method2($wpArea)
method2 might look something like:
#DECLARE($document Object)
var $context : Object
$context:=WP Get data context($document)
ALERT(JSON Stringify($context))