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 Opened
sales@elliecomputing.com - Contact us


FolderDocument.View object

 

 

Prototype for FolderDocument.View objects. Is a kind of View object.

Syntax

 You cannot create View object directly. Views are created as necessary when DocumentFrame  objects are created for a document.

var my_doc;
var doc_frame = add_frame (my_doc);
var left_view = doc_frame.coordinator.views.left;

Parameters

none.

Property Of

none.

Implemented In

ECMerge 2.1

Description

 FolderDocument.View objects let you navigate to a given item, obtain the selection or set it.

Properties

none specific. 

Methods

clone_selection
navigate
set_selection

Examples

Example 1.

Sets the selection to the current one with an additional item called "/path/file.txt":

var sel = current_frame.coordinator.current_view.clone_selection();
sel.add ("/path/file.txt");
current_frame.coordinator.current_view.set_selection (sel);

See Also 

  FolderDocument object, FolderDocument.Selection object

Method clone_selection

Syntax

function clone_selection ( )
returns a FolderDocument.Selection object.

Parameters

none.

Method Of

FolderDocument.View object

Implemented In

ECMerge 2.1

Description

Returns a new selection object which contains the same elements as those selected in the view.

Examples

Example 1.

Retrieves the selection of the current view:

current_frame.coordinator.current_view.clone_selection();

See Also 

  FolderDocument.View object, FolderDocument.Selection object

Method navigate

Syntax

function navigate (item)

Parameters

item.  FolderDocument.Item object. item to which the view should navigate.

Method Of

FolderDocument.View object

Implemented In

ECMerge 2.1

Description

Opens folders as necessary then set the current position and selection of the view to the given item.

Examples

Example 1.

Navigate to the first item inside the root:

var current_doc = current_frame.coordinator.document;
current_doc.root.children.fill ();
if (current_doc.root.children.length > 0)
    current_frame.coordinator.current_view.navigate (current_doc.root.children[0]);

See Also 

  FolderDocument.View object, FolderDocument.Item object

Method set_selection

Syntax

function set_selection (selection)

Parameters

selection. FolderDocument.Selection object. Selection to set on the view

Method Of

FolderDocument.View object

Implemented In

ECMerge 2.1

Description

Selects in the view exactly the same items as those included in selection.

Examples

Example 1.

Builds a selection containing all the items, then set it on the view (actually selecting all items):

var current_doc = current_frame.coordinator.document;
var sel = new FolderDocument.Selection (current_doc, true);

current_frame.coordinator.current_view.set_selection (sel);

See Also 

  FolderDocument.View object, FolderDocument.Selection object