task

CREATE-article# #

[previously]

  1. [00:00] NEW task IN ?
    1. [] #  - UPDATE-article# 1679 -
    2. [x] cuts - see below
    3. [x] re-adjust wording
  2. [00:00] NEW article IN 
    1. [] # # - 

[currently]

  1. []  

[next]

  1. []

cuts



004 // OBJECT - PROTOTYPE CLASS - defining a new class called Pet

var app = function(name, qryL1, L1name, ... ){
 this.name = name;
 this.qryL1 = qryL1;

this.L1name;
};


005 // OBJECT

function app(name, qryL1, L1name, ... ) {
  this.name = name;
  this.qryL1 = function(line) {
    print("The ", this.name, " app says '", line, "'");
  };
}

var killerApp = new App("subjects", ..);


//- dont have to use the NEW keyword to instantiate instance of object, if you do, the ".this" operator will point to the 'your object' prototype and not the js object prototype


// PROPERTIES of app
dlgSelect3.qryL1 = "../qry/Select-Libraries-a.cshtml/";
dlgSelect3.L1 = "Library";
dlgSelect3.id= $("#id_article").text();
dlgSelect3.qryMove="../qry/updateArticle/";
dlgSelect3.Destination = "-";
dlgSelect3.qryCopy ="../qry/copy_records/";
dlgSelect3.To = $("#parent_id2").val();


// app is set by srv, ex current_app = subjects, SAVE in hidden input

// dlgSelect3 script has dlgSelect3 object,  properties of are ..., initially set in switch block

// could define in global ] app prototype/class,

-    create new instance of app


  1. adding "methods" to your class
  2. remember class is just a function that constructs your object instance
  3. EXAMPLE person object
  4. http://www.phpied.com/3-ways-to-define-a-javascript-class/
  5. add methods to your object constructor using the prototype property of your constructor, Person.prototype = age()
    1. example - adding additional methods
  6.  

 

[reference]

  1. [] (id=2737) TASK create art - object prototype // 2737 is NOT the task for creating this article,
  2. [] CC adding Properties and Methods to an existing object using the object.prototype
  3. [] //- dont have to use the NEW keyword to instantiate instance of object, if you do, the ".this" operator will point to the 'your object' prototype and not the js object prototype
Details Photos Edit more

Details

ID: 7450

NAME: UPDATE-article-object-constructor-function

DESCRIPTION: []

START DATE TIME: 2019-12-07 18:34:21

EST DURATION: 01:00:00

END DATE TIME: 2019-12-07 19:34:21

STATUS: To-Do

PRIORITY: -5

OWNER ID: 1

Content Photos Edit more

photos

photos for this task

actions

Agenda Email task SMS task Priorities