Namespace: OrionUpdate

OrionUpdate

Collection of methods for dealing with Framework updates.

Source:

Methods

<static> cancelUpdate()

Clears the update error callback, stopping those events from being sent.

Source:
See:

<static> setErrorCallback(objectName, callbackName)

Sets a callback to get progress for a framework update download.

Parameters:
Name Type Argument Default Description
objectName String <optional>
'window'

Namespace containing method.

callbackName String

Name of method.

Source:
See:
Fires:
Example
OrionUpdate.setErrorCallback('', 'errorCallback');

function errorCallback(event)
{
   if (event.eventName == 'updateErrorEvent')
   {
       var code = event.errorCode;
       
       // ...
   }
}

<static> setProgressCallback(objectName, callbackName)

Sets a callback to get progress for a framework update download.

Parameters:
Name Type Argument Default Description
objectName String <optional>
'window'

Namespace containing method.

callbackName String

Name of method.

Source:
See:
Fires:
Example
OrionUpdate.setProgressCallback('', 'progressCallback');

function progressCallback(event)
{
   if (event.eventName == 'updateProgressEvent')
   {
       var currentBytes = event.current,
           totalBytes   = event.total;    
       
       // ...
   }
}

<static> startUpdate(targetVersion, url)

Starts a update check/download. If an update is found, it will begin downloading the update.

Parameters:
Name Type Description
targetVersion String

Representation of the framework version we are updating to. e.g "2.1.2".

url String

Location to look for the XML file on Mac, or the serverside script on Windows. Pass in a blank string to use the default value.

Source:
See:
Example
OrionUpdate.startUpdate('3.4.1', '');

<static> unsetErrorCallback()

Clears the update error callback, stopping those events from being sent.

Source:
See:

<static> unsetProgressCallback()

Clears the update download progress callback, stopping those events from being sent.

Source:
See: