Browsing VJET elements using the script explorer

In this section, you will learn how to browse VJET elements within the VJETProject project.

  1. Please make sure the VJETProject project is expanded in the Script Explorer, so you can see its packages and files. You can go to the previous section to review how to create a VJET Type or Project.
  2. Here, we provide an example for you, you can replace the following code in your VJET file.
    vjo.ctype("test.Test")
    .props({
        //> public boolean isOpenAccount
        isOpenAccount: function() {
            var acc = true; //< boolean
            return acc;
        }
    })
    .protos({
        open: true,                //< private boolean
        balance: undefined,        //< private double
    	
        //> public boolean
        isOpen: function() {       
            return this.open ; 
        },
        
        //> public void setOpen(boolean open)  
        setOpen: function(open) {
            this.open = open ;
        },
        
        //> public void constructs(boolean open, double balance) 
        constructs: function(open, balance) {
            this.setOpen(open) ;
            this.balance = balance ;
        }
    })
    .endType();
  3. Expand the VJET file Test.js.

    The picture below shows the example of the Script Explorer:

    Script explorer

    Note: Script Explorer shows the elements of the source code file. The public type and its members (fields and methods) appear in the tree.

  4. Save the file.

Related reference