Frame Tree

In this chapter, the interrelationship of Forms is described with more concrete schematics.

Notation

It describes the notation used when the interrelationship of Frame.

Box

It is an item on collection but doesn’t mean the real name.

Connection Line

1:1 connection and the diamond side is Child.

1:N connection and the round side is Child.

Description

The above marks mean as follows:

Definition of Terms

term

description

element

The property, method, event of component is collectively called as the element of component.

Syntax Used Commonly

Form

Relationship Schematic

Example Screen for Script

The order of index is assumed as btn0, btn1, cmb0, dtset1, bind1, div0, div1.

In a form on the same level, id cannot be duplicated. In other words, since btn0 and div0_btn0 and div2_btn are not the same levels, they may be designated to the same id

Script approach to component / invisible object / bind

this.classname == "frm0"
this.name == "frm0"
this.all["btn0"].name == "btn0"
this.all[0].name == "btn0"
this.btn0.name == "btn0"
this.components[0].name == "btn0"
this.components["btn0"].name == "btn0"
this.all["dtset1"].name == "dtset1"
this.all[3].name == "dtset1"
this.dtset1.name == "dtset1"
this.objects[0].name == "dtset1"
this.objects["dtset1"].name == "dtset1"
this.all.length == 7
this.components.length == 5 //btn0, btn1, comb0, div0, div1
this.binds.length == 1

Script approach tocontainer component

The container component without connection to form can’t have invisible object / bind but only have component.

this.div0. btn0.name== "div0_btn0"
this.div0.all[0]. name == "div0_btn0"
this.components[3].components[0]. name == "div0_btn0"
this.div0.div2.div2_btn0.name == "div2_btn0"
this.all["div0"].all["div2"].all["div2_btn0"].name == "div2_btn0"
this.components["div0"].components["div2"].components["div2_btn0"].name == "div2_btn0"

Script approach to container component which connects form

this.name== "div1" // as this value is the id of the container component which connects form, it is changeable. 
this.btn0.name== this.all["btn0"].name == "btn0"

Approach to dtset1 in frm1 (in case of approaching to the script in frm0)

this.name == "frm0"
this.div1.btn0.name == "btn0" //It is approachable only with "divl" which absorbs"frm1".

Script use for parent

this.div1.dtset2.parent.parent.classname == "frm0"
this.div1.dtset2.parent.name == "div1"// As frm1 is connected to div1, it becomes to lose its characteristics.
this.div1.dtset2.parent.classname == undefined// As frm1 is connected to div1, it becomes to lose its characteristics and the classname doesn’t exist. 
this.div1.dtset2.parent.name == "div1"

Use of the element of container component

The container component which connects form can have components, invisible object, bind (sub-element) like form.

The container component which doesn’t connect form can’t have invisible object nor bind but can have only component.

The component, invisible object and bind which do not have the function of container can’t have element.

The container component has the characteristics of the connected form.

Application for the Single Frame Form

Relationship Schematic

The component / bind / invisible object in the form doesn’t have either .getOwnerFrame() or .getOwnerForm().

Example Screen for Script

In case of single Frame, MainFrame can have only one between ChildFrame and TabFrame.

Form Approach to Script at Application

application.mainframe.frame.form.name =="frm0"
application.mframe0.frame.form.name == "frm0"
application.mframe0.chdframe0.form.name == "frm0"
application.all[0].all[0].form.name == "frm0"
application.all["mframe0"].all["chdframe0"].form.name == "frm0"
mainframe.frame.form.name == "frm0"
application.mainframe.frame.tabframepages[0].form.name == "frm1"
application.mainframe.frame.tabframepages["tabframeP0"].form.name == "frm1"
application.all[0].all[0].all[0].form.name == "frm1"
application.all["mframe0"].all["tabframe0"].all["tabframeP0"].form.name == "frm1"

Application Approach to Script at Form

this.parent.name == "chdframe0"
this.parent.parent.name == "mframe0"
this.getOwnerFrame().getOwnerFrame().name == "mframe0"
this.getOwnerFrame().getOwnerFrame().parent.mainframe.name == "mframe0"
this.parent.name == "tabframeP0"
this.parent.parent.name == "tabframe0"
this.parent.parent.parent.name == "mframe0"
this.getOwnerFrame().getOwnerFrame().getOwnerFrame().name == "mframe0"

Application for the Multi Frame Form

Relationship Schematic

Example Screen for Script

Each of FrameSet in frameset_n can have the structure of"frameset0".

It approaches with the same method as that of single frame except frames[].

Form approach to script at application

application.mainframe.frame == application.mainframe.frameset0
application.mainframe.frame.chdframe0.form.name== "frm1" //
application.mainframe.frame.frames[0].form.name == "frm1"
application.mainframe.frame.frames["chdframe0"].form.name == "frm1"
application.mainframe.frame.frames[1].tabframepages[0].form.name == "frm1"

Forms of Modal and Modaless Form

Relationship Schematic

Method to use Script at nested ChildFrame

// ********** Generate ChildFrame.***************
var frameobj = new ChildFrame("childfrm0", 10, 10, 100, 100, "url");
or 
var frameobj = new ChildFrame("childframe");
frameobj.init ("childframe", 10, 10, 100, 100);

// ********** Connect ChildFrame to Frameset. **********
mainframe.frameset.addChild("chd0", frameobj);
or 
frameset.inertChild(1, "chd0", frameobj);

// ********** Show ChildFrame on the screen. **********
frameobj.show();

// ********** Show ChildFrame on the screen. **********
mainframe.frameset.removeChild("chd0");
frameobj.destroy();
frameobj = null;

Method to use Script at modal/modaless ChildFrame

var frameobj = new ChildFrame("childfrm0", 10, 10, 100, 100, "url");
or 
var frameobj = new ChildFrame("childframe");
frameobj.init ("childframe", 10, 10, 100, 100);
var parentframeobj = mainframe.frameset.ChildFrame0;
frameobj.showModal(parentframeobj);
or
frameobj.showModeless(parentframeobj);