ModuleReference source
Specializes Montage
Properties
-
id :string <constructor> source
-
The absolute id of the module within the
require
package -
ModuleReference <constructor> source
-
-
require :function <constructor> source
-
The require of a package.
Methods
-
resolve(otherRequire) → {string} <constructor> source
-
Resolves this module reference so that it can be required from otherRequire.
Parameters:
Name Type Description otherRequire
function Require from another package that has the package of this module as a dependency.
Throws:
If there is no mapping from this require inside otherRequire.- Type
- Error
Returns: string
The module id to pass to otherRequire that results in this module.
Examples
var ref = new ModuleReference().initWithIdAndRequire("core/uuid", montageRequire); ref.resolve(applicationRequire); // => "montage/core/uuid"
var ref = new ModuleReference().initWithIdAndRequire("ui/main.reel", applicationRequire); ref.resolve(montageRequire); // => Error // because there is no module id such that montageRequire(id) can // return the module from inside your application
-
callDelegateMethod(name) source
-
This method calls the method named with the identifier prefix if it exists. Example: If the name parameter is "shouldDoSomething" and the caller's identifier is "bob", then this method will try and call "bobShouldDoSomething"
Parameters:
Name Type Description name
string Inherited From: -
equals(anObject) → {boolean} source
-
Returns true if two objects are equal, otherwise returns false.
Parameters:
Name Type Description anObject
Object The object to compare for equality.
Inherited From: Returns: boolean
Returns
true
if the calling object andanObject
are identical and theiruuid
properties are also equal. Otherwise, returnsfalse
.
Generated from a4679af
ModuleReference source
Specializes Value
Properties
-
id :string <constructor> source
-
The absolute id of the module within the
require
package -
ModuleReference <constructor> source
-
-
require :function <constructor> source
-
The require of a package.
Methods
-
resolve(otherRequire) → {string} <constructor> source
-
Resolves this module reference so that it can be required from otherRequire.
Parameters:
Name Type Description otherRequire
function Require from another package that has the package of this module as a dependency.
Throws:
If there is no mapping from this require inside otherRequire.- Type
- Error
Returns: string
The module id to pass to otherRequire that results in this module.
Examples
var ref = new ModuleReference().initWithIdAndRequire("core/uuid", montageRequire); ref.resolve(applicationRequire); // => "montage/core/uuid"
var ref = new ModuleReference().initWithIdAndRequire("ui/main.reel", applicationRequire); ref.resolve(montageRequire); // => Error // because there is no module id such that montageRequire(id) can // return the module from inside your application
-
callDelegateMethod(name) source
-
This method calls the method named with the identifier prefix if it exists. Example: If the name parameter is "shouldDoSomething" and the caller's identifier is "bob", then this method will try and call "bobShouldDoSomething"
Parameters:
Name Type Description name
string Inherited From: -
equals(anObject) → {boolean} source
-
Returns true if two objects are equal, otherwise returns false.
Parameters:
Name Type Description anObject
Object The object to compare for equality.
Inherited From: Returns: boolean
Returns
true
if the calling object andanObject
are identical and theiruuid
properties are also equal. Otherwise, returnsfalse
.
Generated from a4679af