Class R.resources.loaders.ObjectLoader
Extends
R.resources.loaders.RemoteLoader.
Loads JSON objects from a specified URL. The object uses a sligtly modified
format which allows for single-line comments in the object definition. The
object must follow the rest of the JSON spec, with key names in quotes.
Defined in: objectloader.js.
Constructor Attributes | Constructor Name and Description |
---|---|
- Fields borrowed from class R.resources.loaders.RemoteLoader:
- STATUS_CACHED, STATUS_NOT_FOUND, STATUS_OK, STATUS_SERVER_ERROR
Method Attributes | Method Name and Description |
---|---|
afterLoad(name, obj)
[ABSTRACT] Allow a subclass to handle the data, potentially loading additional
resources and preparing for use.
|
|
constructor(name)
private
|
|
Get the class name of this object.
|
|
The name of the resource this loader will get.
|
|
load(name, url)
Load a JSON object from a URL.
|
- Methods borrowed from class R.resources.loaders.RemoteLoader:
- exists, getPathUrl, setPathUrl
- Methods borrowed from class R.resources.loaders.AbstractResourceLoader:
- clear, destroy, exportAll, get, getCachedObjects, getResourceObject, getResources, isReady, release, set, setReady, unload
- Methods borrowed from class R.engine.BaseObject:
- addEvent, addEvents, getElement, jQ, removeEvent, setElement, triggerEvent, update
- Methods borrowed from class R.engine.PooledObject:
- clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.resources.loaders.ObjectLoader(name)
- Parameters:
- name
- {String=ObjectLoader} The name of the resource loader
Method Detail
afterLoad(name, obj)
[ABSTRACT] Allow a subclass to handle the data, potentially loading additional
resources and preparing for use.
- Parameters:
- name
- {String} The name of the object
- obj
- {Object} The object which was loaded
constructor(name)
private
- Parameters:
- name
{String}
getClassName()
Get the class name of this object.
- Returns:
- {String} The string "R.resources.loaders.ObjectLoader"
{String}
getResourceType()
The name of the resource this loader will get.
- Returns:
- {String} The string "object"
load(name, url)
Load a JSON object from a URL.
- Parameters:
- name
- {String} The name of the resource
- url
- {String} The URL where the resource is located