<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="generator" content="JsDoc Toolkit" /> <title>JsDoc Reference - rio.Application</title> <style type="text/css"> /* default.css */ body { font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif; /* width: 100%;*/ } .header { clear: both; background-color: #ccc; padding: 8px; } h1 { font-size: 150%; font-weight: bold; padding: 0; margin: 1em 0 0 .3em; } hr { border: none 0; border-top: 1px solid #7F8FB1; height: 1px; } pre.code { display: block; padding: 8px; border: 1px dashed #ccc; } #index { margin-top: 24px; float: left; width: 160px; position: absolute; left: 8px; background-color: #F3F3F3; padding: 8px; } #content { width: 98%; } .classList { list-style-type: none; padding: 0; margin: 0 0 0 8px; font-family: arial, sans-serif; font-size: 1em; overflow: auto; } .classList li { padding: 0; margin: 0 0 8px 0; } .summaryTable { width: 100%; } h1.classTitle { font-size:170%; line-height:130%; } h2 { font-size: 110%; } caption, div.sectionTitle { background-color: #7F8FB1; color: #fff; font-size:130%; text-align: left; padding: 2px 6px 2px 6px; border: 1px #7F8FB1 solid; } div.sectionTitle { margin-bottom: 8px; } .summaryTable thead { display: none; } .summaryTable td { vertical-align: top; padding: 4px; border-bottom: 1px #7F8FB1 solid; border-right: 1px #7F8FB1 solid; } /*col#summaryAttributes {}*/ .summaryTable td.attributes { border-left: 1px #7F8FB1 solid; width: 140px; text-align: right; } td.attributes, .fixedFont { line-height: 15px; color: #002EBE; font-family: "Courier New",Courier,monospace; font-size: 13px; } .summaryTable td.nameDescription { text-align: left; font-size: 13px; line-height: 15px; } .summaryTable td.nameDescription, .description { line-height: 15px; padding: 4px; padding-left: 4px; } .summaryTable { margin-bottom: 8px; } ul.inheritsList { list-style: square; margin-left: 20px; padding-left: 0; } .detailList { margin-left: 20px; line-height: 15px; } .detailList dt { margin-left: 20px; } .detailList .heading { font-weight: bold; padding-bottom: 6px; margin-left: 0; } .light, td.attributes, .light a:link, .light a:visited { color: #777; font-style: italic; } .fineprint { text-align: right; font-size: 10px; } </style> </head> <body> <div id="content"> <!-- ============================== class title ============================ --> <h1 class="classTitle"> Class rio.Application </h1> <!-- ============================== class summary ========================== --> <p class="description"> <br />Extends <a href="../symbols/rio.Attr.html#constructor">rio.Attr</a>.<br /> Application is used to create new rio application classes. It provides functionality for dependency management, routing, history management and page management. <br /><i>Defined in: </i> <a href="../symbols/src/public_javascripts_lib_application.js.html">application.js</a>. </p> <!-- ============================== constructor summary ==================== --> <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class rio.Application."> <caption>Class Summary</caption> <thead> <tr> <th scope="col">Constructor Attributes</th> <th scope="col">Constructor Name and Description</th> </tr> </thead> <tbody> <tr> <td class="attributes"> </td> <td class="nameDescription" > <div class="fixedFont"> <b><a href="../symbols/rio.Application.html#constructor">rio.Application</a></b>() </div> <div class="description"></div> </td> </tr> </tbody> </table> <!-- ============================== properties summary ===================== --> <!-- ============================== methods summary ======================== --> <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class rio.Application."> <caption>Method Summary</caption> <thead> <tr> <th scope="col">Method Attributes</th> <th scope="col">Method Name and Description</th> </tr> </thead> <tbody> <tr> <td class="attributes"><static> </td> <td class="nameDescription"> <div class="fixedFont">rio.Application.<b><a href="../symbols/rio.Application.html#.create">create</a></b>(name, extends, args) </div> <div class="description">Creates an instance of rio.Application.</div> </td> </tr> <tr> <td class="attributes"><static> </td> <td class="nameDescription"> <div class="fixedFont">rio.Application.<b><a href="../symbols/rio.Application.html#.fail">fail</a></b>(msg, msg) </div> <div class="description">This causes the application to fail and log a 'fail' error message.</div> </td> </tr> <tr> <td class="attributes"> </td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/rio.Application.html#getCurrentPage">getCurrentPage</a></b>() </div> <div class="description">Returns the instance of the currently loaded page in the app.</div> </td> </tr> <tr> <td class="attributes"><static> </td> <td class="nameDescription"> <div class="fixedFont">rio.Application.<b><a href="../symbols/rio.Application.html#.include">include</a></b>(fileName) </div> <div class="description">Alias of rio.Application.require</div> </td> </tr> <tr> <td class="attributes"><static> </td> <td class="nameDescription"> <div class="fixedFont">rio.Application.<b><a href="../symbols/rio.Application.html#.includeCss">includeCss</a></b>(toInclude) </div> <div class="description"></div> </td> </tr> <tr> <td class="attributes"> </td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/rio.Application.html#reboot">reboot</a></b>() </div> <div class="description">Reboots your application.</div> </td> </tr> <tr> <td class="attributes"> </td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/rio.Application.html#refresh">refresh</a></b>() </div> <div class="description">Refreshes the browser.</div> </td> </tr> <tr> <td class="attributes"><static> </td> <td class="nameDescription"> <div class="fixedFont">rio.Application.<b><a href="../symbols/rio.Application.html#.require">require</a></b>(fileName) </div> <div class="description">Alias of rio.Application.require</div> </td> </tr> <tr> <td class="attributes"><static> </td> <td class="nameDescription"> <div class="fixedFont">rio.Application.<b><a href="../symbols/rio.Application.html#.route">route</a></b>(path, target) </div> <div class="description">Specifies the lowest priority route for an application class.</div> </td> </tr> <tr> <td class="attributes"> </td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/rio.Application.html#toString">toString</a></b>() </div> <div class="description"></div> </td> </tr> <tr> <td class="attributes"><static> </td> <td class="nameDescription"> <div class="fixedFont">rio.Application.<b><a href="../symbols/rio.Application.html#.toString">toString</a></b>() </div> <div class="description"></div> </td> </tr> <tr> <td class="attributes"> </td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/rio.Application.html#unload">unload</a></b>() </div> <div class="description">This method is called just before the page is unloaded.</div> </td> </tr> </tbody> </table> <dl class="inheritsList"> <dt>Methods borrowed from class <a href="../symbols/rio.Attr.html#constructor">rio.Attr</a>: </dt><dd><a href="../symbols/rio.Attr.html#bind">bind</a>, <a href="../symbols/rio.Attr.html#binding">binding</a>, <a href="../symbols/rio.Attr.html#.extend">extend</a>, <a href="../symbols/rio.Attr.html#fire">fire</a>, <a href="../symbols/rio.Attr.html#.fireWhenReady">fireWhenReady</a>, <a href="../symbols/rio.Attr.html#freeze">freeze</a>, <a href="../symbols/rio.Attr.html#frozen">frozen</a>, <a href="../symbols/rio.Attr.html#observe">observe</a>, <a href="../symbols/rio.Attr.html#setAndReturnAfterSet">setAndReturnAfterSet</a>, <a href="../symbols/rio.Attr.html#stopObserving">stopObserving</a>, <a href="../symbols/rio.Attr.html#.transaction">transaction</a>, <a href="../symbols/rio.Attr.html#unfreeze">unfreeze</a>, <a href="../symbols/rio.Attr.html#.updateAttributes">updateAttributes</a></dd> </dl> <!-- ============================== constructor details ==================== --> <div class="details"><a name="constructor"> </a> <div class="sectionTitle"> Class Detail </div> <div class="fixedFont"> <b>rio.Application</b>() </div> <div class="description"> </div> </div> <!-- ============================== field details ========================== --> <!-- ============================== method details ========================= --> <div class="sectionTitle"> Method Detail </div> <a name=".create"> </a> <div class="fixedFont"><static> <span class="light">{<a href="../symbols/rio.Application.html#constructor">rio.Application</a>}</span> <span class="light">rio.Application.</span><b>create</b>(name, extends, args) </div> <div class="description"> Creates an instance of rio.Application. </div> <pre class="code"> rio.apps.example = rio.Application.create({ require: ["pages/example_page"], requireCss: ["css_reset", "example"], routes: { "": "examplePage" }, attrAccessors: [], attrReaders: [], methods: { initialize: function(options) { }, examplePage: function() { return new rio.pages.ExamplePage(); } } });</pre> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{String}</span> <b>name</b> </dt> <dd>(optional) The name of this Application. Used primarily for testing reports.</dd> <dt> <span class="light fixedFont">{<a href="../symbols/Object.html#constructor">Object</a>}</span> <b>extends</b> </dt> <dd>(optional) An Attr class to use as a superclass.</dd> <dt> <span class="light fixedFont">{<a href="../symbols/Object.html#constructor">Object</a>}</span> <b>args</b> </dt> <dd>(optional) The definition of the class.</dd> </dl> <dl class="detailList"> <dt class="heading">Returns:</dt> <dd>a new instance of type Application</dd> </dl> <hr /> <a name=".fail"> </a> <div class="fixedFont"><static> <span class="light">rio.Application.</span><b>fail</b>(msg, msg) </div> <div class="description"> This causes the application to fail and log a 'fail' error message. If the application class has a fail method, that method will be called with the message passed in here. </div> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{String}</span> <b>msg</b> </dt> <dd>The application failure message</dd> <dt> <span class="light fixedFont">{String}</span> <b>msg</b> </dt> <dd>A more in depth description of the application failure</dd> </dl> <hr /> <a name="getCurrentPage"> </a> <div class="fixedFont"> <span class="light">{<a href="../symbols/rio.Page.html#constructor">rio.Page</a>}</span> <b>getCurrentPage</b>() </div> <div class="description"> Returns the instance of the currently loaded page in the app. </div> <dl class="detailList"> <dt class="heading">Returns:</dt> <dd>the instance of the currently loaded page</dd> </dl> <hr /> <a name=".include"> </a> <div class="fixedFont"><static> <span class="light">rio.Application.</span><b>include</b>(fileName) </div> <div class="description"> Alias of rio.Application.require </div> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{String}</span> <b>fileName</b> </dt> <dd>The path to the javascript file that will be loaded.</dd> </dl> <hr /> <a name=".includeCss"> </a> <div class="fixedFont"><static> <span class="light">rio.Application.</span><b>includeCss</b>(toInclude) </div> <div class="description"> </div> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <b>toInclude</b> </dt> <dd></dd> </dl> <hr /> <a name="reboot"> </a> <div class="fixedFont"> <b>reboot</b>() </div> <div class="description"> Reboots your application. Rebooting your application will reset and reload the current page. </div> <hr /> <a name="refresh"> </a> <div class="fixedFont"> <b>refresh</b>() </div> <div class="description"> Refreshes the browser. This will reload your app's source code and reinitialize your app. This is more severe than rebooting. </div> <hr /> <a name=".require"> </a> <div class="fixedFont"><static> <span class="light">rio.Application.</span><b>require</b>(fileName) </div> <div class="description"> Alias of rio.Application.require </div> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{String}</span> <b>fileName</b> </dt> <dd>The path to the javascript file that will be loaded.</dd> </dl> <hr /> <a name=".route"> </a> <div class="fixedFont"><static> <span class="light">rio.Application.</span><b>route</b>(path, target) </div> <div class="description"> Specifies the lowest priority route for an application class. <b>You are better off specifying routes when creating an application with a 'routes' parameter.</b> </div> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <b>path</b> </dt> <dd></dd> <dt> <b>target</b> </dt> <dd></dd> </dl> <hr /> <a name="toString"> </a> <div class="fixedFont"> <b>toString</b>() </div> <div class="description"> </div> <hr /> <a name=".toString"> </a> <div class="fixedFont"><static> <span class="light">rio.Application.</span><b>toString</b>() </div> <div class="description"> </div> <hr /> <a name="unload"> </a> <div class="fixedFont"> <b>unload</b>() </div> <div class="description"> This method is called just before the page is unloaded. This can be triggered by following a link, closing the window, using the back button, etc. <i>This method is meant to be overriden</i> </div> <hr /> </div> <!-- ============================== footer ================================= --> <div class="fineprint" style="clear:both"> Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Fri Jan 29 2010 14:20:38 GMT-0600 (CST) </div> </body> </html>