Try OpenEdge Now
skip to main content
Object-oriented Programming
Developing and Deploying Classes : Accessing class definition files using the Procedure Editor : Checking and running a class from the Procedure Editor : Run option
 
Run option
For an edit buffer loaded from or saved to a file, the Compile > Run option of the Procedure Editor determines what syntax it must contain based on the filename extension. A class (.cls) file must contain CLASS or INTERFACE syntax, or the Procedure Editor generates a syntax error when it tries to run the file. Any other type of file must not contain CLASS or INTERFACE syntax, or the Procedure Editor generates a syntax error when trying to run the file.
Note that for a class definition file, you must save any changes to a loaded or saved edit buffer in order for the Procedure Editor to execute them. In other words, the Procedure Editor always executes the last saved version of the class definition file in the current edit buffer.
For an untitled edit buffer, the Procedure Editor does not allow you to run the code if the edit buffer contains CLASS or INTERFACE syntax. You must first save the untitled edit buffer to a file with the .cls extension and to the PROPATH-relative filename specified by the class or interface type name defined in the file. For more information on class or interface type names, see Usingthe CLASS construct or Usingthe INTERFACE construct, respectively. Again, remember to save your latest changes before trying to run them in a saved edit buffer, as the Procedure Editor always runs the code that is actually on disk.