ObjectsObjects are very important in programming. Objects are structured data types that contain fields that hold values. Objects, however, also contain methods. Methods are procedures and functions that act on the data in the object's fields.Each time you click on a button in Ensign Windows, you are calling the button object's click method to perform a specific task. Each button, menu item, window, chart, study and draw tool in Ensign Windows is an object. Many of the objects in Ensign Windows can be controlled by ESPL, which exposes tremendous power to ESPL scripts. Example: begin The chart statement is a predefined function in the ESPL library. While this statement is simple to use and understand, it required more than 3,000 lines of code to implement the chart object. The chart object creates a Multiple Document Interface child window, loads a data file, updates the file with data from the tick pool, determines the scale, draws the chart, scale and grid, and applies other objects such as studies and draw tools. Button Objects Exposed btnPrint is the name of the Print button object. Click is the name of its method. The btnPrint.click; statement calls the click method for this object which is the same method called by clicking on the Print button with the mouse. This method transfers the image of the current window, the chart, to the printer. The printing of a chart required more than 500 lines of code to implement. Menu Objects Exposed begin |