extension¶
-
class
Extension
(name)¶ Extends: Emitter Mixins: AjaxMixin Mixins: LoggerMixin The basis of an extension.
-
read-only
name
¶ Type: String The name of the workspace.
-
addView
(viewClass)¶ Adds a view class to the extension. A view can be party of only one extension.
Arguments: - viewClass (JClass(BaseView)) – The view class to add.
Throws: - Error – If viewClass is not a JClass extending BaseView.
- Error – If the viewClass is already assigned to another extension.
- Error – If a viewClass with the same name is alrady registered.
Returns: The main menu entry of the class (viewClass._members.mainMenuEntry).
Return type: Object|null
-
(menuItems)¶
- Adds the given menu items to the main menu.
Arguments: - menuItems (Array) – The items to add.
-
addViews
(viewClasses)¶ Adds multiple views to the extension. Calls
addView()
for each element of the provided Array.Arguments: - viewClasses (Array(JClass(BaseView))) – An Array of view classes.
Throws: Error – If viewClasses is not an Array.
-
getView
(viewName)¶ Retrieves the view class for the view with this name.
Arguments: - viewName (String) – The name of the view to retrieve.
Returns: The view class or null if there is none for the given name.
Return type: BaseView
-
read-only
views
¶ Type: Object(name => JClass(BaseView)) The object that holds all the views by their name. Safe aginst manipulation.
-
closeAllInstances
()¶ Closes all know instances of this extension. Is syncronus.
-
class-member
load
(callback)¶ Loades all extensions.
Callback args: - err (String|null) – null on success else the error description.
-
class-member
byName
(name)¶ Retrieves the view class by its name.
Arguments: - name (String) – The new of the view class.
Returns: The view class.
Return type: JClass(BaseView)
-
read-only class-member
extensions
¶ Type: Object(name => Extension) The object that holds all the extensions by their name. Safe aginst manipulation.
-
read-only