ludo.Core

ludo.


new ludo.Core(config)

Base class for components and views in ludoJS. This class extends
Mootools Events class.

Parameters:
Name Type Description
config Object
Properties
Name Type Description
name String

Name

stateful Boolean

When set to true, properties set in statefulProperties can be saved to the browsers local storage.

statefulProperties Array

Array of stateful properties.

Source:

Methods


addControllerEvents()

Add events to controller

Source:
Returns:

void

Example
this.controller.addEvent('eventname', this.methodName.bind(this));

getId()

Return id of component

Source:
Returns:

String id


getName()

Get name of component and form element

Source:
Returns:

String name


getNamespace() → {String}

Returns component type minus class name, example:
type: calendar.View will return "calendar"

Source:
Returns:

namespace

Type
String

saveState()

Save state for stateful components and views. States are stored in localStorage which
is supported by all major browsers(IE from version 8).

Source:
Returns:

void

Examples
myComponent.saveState();
	 OR
	 
this.fireEvent('state');
	 which does the same.