13.07.2015 Views

Using Caché Studio - InterSystems Documentation

Using Caché Studio - InterSystems Documentation

Using Caché Studio - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Working with CSP Files14.5 Compiling a CSP FileCompile a CSP file using Build > Compile. Compiling a CSP File is a multi-step process: first the CSPfile is fed through the CSP engine and converted into a <strong>Caché</strong> class (derived from the %CSP.Pageclass). Then this generated class is compiled into one or more routines that contain executable code.Sometimes it is easier to debug or understand a CSP file by looking at the code generated for it. Youcan use <strong>Studio</strong> to view the class generated for a CSP file, as well as the routine(s) generated from thisclass by opening them with File > Open or View > Other.14.6 Viewing the Results of a CSP FileYou can view the results of a CSP file in a browser by using View > Web Page. This launches yourdefault browser with the URL for the current CSP page. You can also use this command when editinga %CSP.Page class.You can modify the server address portion of the URL used to display a CSP page in a specific project.To do this, select Project > Settings and edit the value of the WEB Server field.14.7 Viewing Syntax-Colored Source for AnyURLAs an aid to debugging Web applications, <strong>Caché</strong> <strong>Studio</strong> lets you request a Web page from a URL anddisplay its HTML source in a syntax coloring window. This can help you spot errors in Web pagesmore easily than viewing the rendered HTML in a browser.You can open a URL Viewer window using the File > Open URL and entering a URL in the resultingdialog.To try this with a CSP sample page, do the following:1. Select File > Open URL.2. If you have a Web server on your local system, enter http://localhost/csp/samples/custom.cspIf you do not have a Web Server on your local system, use the test HTTP server on the 8972 port(or the port number your system is configured for): http://localhost:8972/csp/samples/custom.csp84 <strong>Using</strong> <strong>Caché</strong> <strong>Studio</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!