nx.Object - Next UI Toolkit

#

API Docs for: trial
Show: Inherited Protected Private Deprecated

# nx.Object Class

Module: nx

The base of any Classes defined in nx framework.

## Constructor

### `nx.Object`

()

- Index
- Methods

## Item Index

### Methods

- can
- define
- destroy
- dispose
- extendEvent static
- extendMethod static
- extendProperty static
- fire
- get
- gets
- has
- inherited
- is
- off
- on
- set
- sets
- upon

## Methods

### `can`

(

- `name`

)
Boolean

Check whether current object has specified event.

#### Parameters:

- `name` String

#### Returns:

Boolean:

### `define`

(

- `[type]`
- `[parent]`
- `[members]`

)
Function

Define a class

#### Parameters:

- `[type]` String optional
- `[parent]` Function optional
- `[members]` Object optional

#### Returns:

Function:

### `destroy`

()

Destroy current object.

### `dispose`

()

Dispose current object.

### `extendEvent`

(

- `target`
- `name`

)
static

Define an event and attach to target.

#### Parameters:

- `target` Object
- `name` String

### `extendMethod`

(

- `target`
- `name`
- `method`

)
static

Define a method and attach to target.

#### Parameters:

- `target` Object
- `name` String
- `method` Function

### `extendProperty`

(

- `target`
- `name`
- `meta`

)
static

Define a property and attach to target.

#### Parameters:

- `target` Object
- `name` String
- `meta` Object

### `fire`

(

- `name`
- `[data]`

)

Trigger an event.

#### Parameters:

- `name` String
- `[data]` optional

### `get`

(

- `name`

)

Get specified property value.

#### Parameters:

- `name` String

#### Returns:

:

### `gets`

() Object

Get all properties.

#### Returns:

Object:

### `has`

(

- `name`

)
Boolean

Check whether current object has specified property.

#### Parameters:

- `name` String

#### Returns:

Boolean:

### `inherited`

()

Call overridden method from super class

### `is`

(

- `type`

)
Boolean

Check whether current object is specified type.

#### Parameters:

- `type` String | Function

#### Returns:

Boolean:

### `off`

(

- `name`
- `[handler]`
- `[context]`

)

Remove an event handler.

#### Parameters:

- `name` String
- `[handler]` Function optional
- `[context]` Object optional

### `on`

(

- `name`
- `handler`
- `[context]`

)

Add an event handler.

#### Parameters:

- `name` String
- `handler` Function
- `[context]` Object optional

### `set`

(

- `name`
- `value`

)

Set specified property value.

#### Parameters:

- `name` String
- `value`

### `sets`

(

- `dict`

)

Set a bunch of properties.

#### Parameters:

- `dict` Object

### `upon`

(

- `name`
- `handler`
- `[context]`

)

Add a single event handler.

#### Parameters:

- `name` String
- `handler` Function
- `[context]` Object optional