renoise.Document.ObservableList
Track changes to document lists by attaching listener functions to it. NB: Notifiers will not broadcast changes made to list items, but only changes to the lists layout (items got added, removed, swapped).
Functions
size(self)
->
integer
Returns the number of entries of the list.
has_notifier(self, notifier : ListNotifierFunction
)
Checks if the given function, method was already registered as notifier.
add_notifier(self, notifier : ListNotifierFunction
)
Register a function or method as a notifier, which will be called as soon as the observable lists layout changed. The passed notifier can either be a function or a table with a function and some context (an "object") -> method.
remove_notifier(self, notifier : ListNotifierFunction
| ListNotifierMemberContext
)
Unregister a previously registered list notifier. When only passing an object, all notifier functions that match the given object will be removed. This will not fire errors when no methods for the given object are attached. Trying to unregister a function or method which wasn't registered, will resolve into an error.
Aliases
ListElementAdded
{ index : integer
, type : "insert"
}
ListElementChange
ListElementAdded
| ListElementRemoved
| ListElementsSwapped
ListElementRemoved
{ index : integer
, type : "removed"
}
ListElementsSwapped
{ index1 : integer
, index2 : integer
, type : "swapped"
}
ListNotifierFunction
(change : ListElementChange
)