| 4D v15WP New | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D v15
 WP New 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WP New {( source )} -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| source | String, BLOB |   | 4D HTML source or 4D Write Blob | |||||
| Function result | Object |   | 4D Write Pro object | |||||
The WP New command creates and returns a 4D Write Pro object.
By default, if you omit the source parameter, the command returns an empty 4D Write Pro object.
You can also use the source parameter, in which case the new 4D Write Pro object will be filled with the contents of the source. You can pass:
You want to create an empty 4D Write Pro object:
 myWPObject:=WP NewYou want to create a 4D Write Pro object containing a simple 4D expression reference:
 C_TEXT(myText)
 myText:="Today is "
 ST INSERT EXPRESSION(myText;"string(current date;System date long)";ST End text)
 myWPA:=WP New(myText)You want to initialize your Write Pro area with a previously-created template:
  //Export template from an existing area
 C_TEXT(wpTemplate)
 WP EXPORT VARIABLE(myWPArea;wpTemplate;wk web page html 4D)
 
  // use the template for a new area
 C_OBJECT(myNewWPA)
 myNewWPA:=WP New(wpTemplate)
	Product:  4D
	Theme:  4D Write Pro Language
	
        
        
	
	Created:  4D v14 R5
	4D Write Pro Reference ( 4D v15)
 Add a comment
Add a comment