Difference between revisions of "SAVEOBJECT()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to save an object or dynamic array to an external .obf file
 
Function to save an object or dynamic array to an external .obf file
 
  
 
==Syntax==
 
==Syntax==
 
SAVEOBJECT(<object>, <expC>)
 
SAVEOBJECT(<object>, <expC>)
 
  
 
==See Also==
 
==See Also==
[[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[CLASS]], [[CLASS - Methods]], [[CLASS - Parameters]], [[CLASS - Properties]], [[CLASS - Scoping]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DEFINE CLASS]], [[DISPLAY CLASSES]], [[DODEFAULT()]], [[FOREACH]], [[LIST CLASSES]], [[LOADOBJECT()]], [[METHOD]], [[NEWOBJECT()]], [[OBJECT()]], [[PRINT_HTML()]], [[PRINT_JSON()]], [[PRINT_R()]], [[PRINT_XML()]], [[REMOVEPROPERTY()]], [[REQUIRE_ONCE()]], [[SQL SELECT]], [[WITH]]
+
[[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DEFINE CLASS]], [[DISPLAY CLASSES]], [[DODEFAULT()]], [[FOREACH]], [[LIST CLASSES]], [[LOADOBJECT()]], [[NEWOBJECT()]], [[OBJECT()]], [[PRINT_HTML()]], [[PRINT_JSON()]], [[PRINT_R()]], [[PRINT_XML()]], [[REMOVEPROPERTY()]], [[REQUIRE_ONCE()]], [[SQL SELECT]], [[WITH]]
 
+
  
 
==Description==
 
==Description==
 
The SAVEOBJECT() function is used to save an object or dynamic array to an external .obf file.  The <object> is the name of the object and <expC> is the name of the target file.  If the file extension is not specififed, '.obf' is assumed.  The SAVEOBJECT() function returns .T. (true) if the object is successfully saved.
 
The SAVEOBJECT() function is used to save an object or dynamic array to an external .obf file.  The <object> is the name of the object and <expC> is the name of the target file.  If the file extension is not specififed, '.obf' is assumed.  The SAVEOBJECT() function returns .T. (true) if the object is successfully saved.
  
The built-in ''save'' [[CLASS - Methods|class method]] can also be used to save an object to an external .obf file.  Similarly, the LOADOBJECT() function can be used to restore an object or dynamic array from an external .obf file and objects have access to the built-in ''load'' [[CLASS - Methods|class method]].
+
The built-in save class method can also be used to save an object to an external .obf file.  Similarly, the LOADOBJECT() function can be used to restore an object or dynamic array from an external .obf file and objects have access to the built-in load class method.
 
   
 
   
 
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
Line 29: Line 25:
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Objects]]
 
[[Category:Objects]]
[[Category:Objects Functions]]
 

Latest revision as of 07:15, 4 February 2013

Purpose

Function to save an object or dynamic array to an external .obf file

Syntax

SAVEOBJECT(<object>, <expC>)

See Also

ACLASS(), ADDPROPERTY(), AMEMBERS(), COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DISPLAY CLASSES, DODEFAULT(), FOREACH, LIST CLASSES, LOADOBJECT(), NEWOBJECT(), OBJECT(), PRINT_HTML(), PRINT_JSON(), PRINT_R(), PRINT_XML(), REMOVEPROPERTY(), REQUIRE_ONCE(), SQL SELECT, WITH

Description

The SAVEOBJECT() function is used to save an object or dynamic array to an external .obf file. The <object> is the name of the object and <expC> is the name of the target file. If the file extension is not specififed, '.obf' is assumed. The SAVEOBJECT() function returns .T. (true) if the object is successfully saved.

The built-in save class method can also be used to save an object to an external .obf file. Similarly, the LOADOBJECT() function can be used to restore an object or dynamic array from an external .obf file and objects have access to the built-in load class method.

Example

class myclass
...
endclass
 
obj1 = new myclass()
saveobject(obj1,"file1")
// or
obj1.save("file1")