Ellié Computing Home Page
My Shopping Cart

Your shopping cart is empty

Display Cart

Call us at +1 586 62 ELLIE / +1 586 62 35543 Office Closed
sales@elliecomputing.com - Contact us


ConfigurationObject object

 

 

 

Prototype for ConfigurationObject objects. Is kind of SerializableObject object.

Syntax

you cannot create a ConfigurationObject, only derived typed can be created such as: EncodingProperties object, Document.Parameters object, SourceDescription object. 

Parameters

 none.

Property Of

none.

Implemented In

ECMerge 2.1

Description

 ConfigurationObject model the object which can be used for any kind of configuration activity. They can be cloned, set from another object of the same kind, tested for equality and they can be transferred from one document to another with transfer.

Properties

no specific properties. 

Methods

clone
set
transfer
equal

Examples

Example 1.

Copies the parameters from a my_document object, changes a source inside, and checks whether something changed.

var param = my_document.parameters.clone ( );    // copy parameters
param.left.url = "c:\\temp\\file.text"; // modify the copy
alert ("they are " + (param.equal(my_document.parameters) ? "equal" : "different");

See Also 

 SerializableObject object

Method clone

Syntax

function clone ( )
returns an Object

Parameters

 none.

Method Of

ConfigurationObject object, Document.Selection object

Implemented In

ECMerge 2.1

Description

Constructs an object of the original object's type and containing the same value, then returns it.

Examples

Example 1.

Creates a clone of an OptionsSet.

var new_options_set = doc.parameters.settings.clone ();

 

Method set

Syntax

function set ( other )

Parameters

other. ConfigurationObject. Object of the same actual type as the object on which set method is called.

Method Of

ConfigurationObject object

Implemented In

ECMerge 2.1

Description

Copies all the values of the other Object into those of this object.

Examples

Example 1.

Creates a clone of an OptionsSet.

var option_set = new OptionsSet();
option_set.set (doc.parameters.settings);

Method transfer

Syntax

function transfer ( other )

Parameters

other. ConfigurationObject object. Object of the same actual type as the object on which set method is called.

Method Of

ConfigurationObject object

Implemented In

ECMerge 2.1

Description

Copies the values of the other Object into those of this object, values which are called 'transferable from a document to another'. Some settings are indeed link to the original document and it would nonsense to use them for another document (for example, where to save its status).

Examples

Example 1.

Creates a new OptionsSet and gets inside it only transferable properties

var option_set = new OptionsSet();
option_set.transfer (doc.parameters.settings);

Method equal

Syntax

function equal ( other )
returns a Boolean

Parameters

other. ConfigurationObject object. Object of the same actual type as the object on which set method is called.

Method Of

ConfigurationObject object

Implemented In

ECMerge 2.1

Description

Returns true if this object and other object are identical.

Examples

Example 1.

Shows a message telling if two documents share the same settings:

var doc1, doc2;
var options_set1 = new OptionsSet(), options_set2 = new OptionsSet();
options_set1.transfer (doc1.parameters.settings);
options_set2.transfer (doc2.parameters.settings);
alert ("document settings are " + (options_set1.equal(options_set2) ? "identical" : "different"));