summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorportix <none@none>2013-02-24 23:57:59 +0100
committerportix <none@none>2013-02-24 23:57:59 +0100
commit73e4adf3a8f69b965e4b5e56b039ad5334ec6956 (patch)
tree449e465829b3b88c3554f66b23c1debfc83ac6ab /api
parent03d9f2c8ccc10184f1be5eb2e78b69776fd51c7d (diff)
downloaddwb-73e4adf3a8f69b965e4b5e56b039ad5334ec6956.zip
Remove signals.disconnectByFunction; block disconnection of signals during emission
Diffstat (limited to 'api')
-rw-r--r--api/dwb-js.741
-rw-r--r--api/jsapi.7.txt22
-rw-r--r--api/jsapi.txt30
3 files changed, 22 insertions, 71 deletions
diff --git a/api/dwb-js.7 b/api/dwb-js.7
index 48da24da..ff076d23 100644
--- a/api/dwb-js.7
+++ b/api/dwb-js.7
@@ -2344,40 +2344,17 @@ Overall return value from all connected callback functions
.nr an-break-flag 1
.br
.ps +1
-\fBBoolean signals.disconnect(Number id)\fR
+\fBBoolean signals.disconnect(Number id|Function callback)\fR
.RS 4
.sp
-disconnect from a signal
+Disconnect from a signal
.PP
-\fIid\fR
-.RS 4
-The id returned from connect
-.RE
-.PP
-\fIreturns\fR
-.RS 4
-true if the signal was disconnected, false if the signal wasn\(cqt found or was already disconnected\&.
-.RE
-.RE
-.sp
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBBoolean signals.disconnectByFunction(Function callback)\fR
-.RS 4
-.sp
-disconnect from all signals with matching callback function
-.PP
-\fIcallback\fR
+\fIid|callback\fR
.RS 4
-The callback function passed to connect
-.RE
-.PP
-\fIreturns\fR
-.RS 4
-true if signals were disconnected, false if no signal was disconnected
+The id returned from
+\fBconnect\fR
+or the callback function passed to
+\fBconnect\fR\&. Note that if the same callback is used more than once the signal must be disconnected by id, otherwise the behaviour is undefined\&.
.RE
.RE
.sp
@@ -2386,10 +2363,10 @@ true if signals were disconnected, false if no signal was disconnected
.nr an-break-flag 1
.br
.ps +1
-\fBBoolean signals.disconnectByName(String signal)\fR
+\fBvoid signals.disconnectByName(String signal)\fR
.RS 4
.sp
-disconnect from all signals with matching name, It should be avoided to call disconnectByName on signals implemented by dwb since it will completely stop the emission of the signal in all scripts\&.
+Disconnect from all signals with matching name, It should be avoided to call disconnectByName on signals implemented by dwb since it will completely stop the emission of the signal in all scripts\&.
.PP
\fIsignal\fR
.RS 4
diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt
index 76cc98d7..85b94e11 100644
--- a/api/jsapi.7.txt
+++ b/api/jsapi.7.txt
@@ -1209,29 +1209,21 @@ _..._;; Objects passed to the callback function
_returns_;; Overall return value from all connected callback functions
****
-==== Boolean signals.disconnect(Number id)
-****
-disconnect from a signal
-
-_id_;; The id returned from connect
-_returns_;; true if the signal was disconnected, false if the signal
-wasn't found or was already disconnected.
+==== Boolean signals.disconnect(Number id|Function callback)
****
+Disconnect from a signal
-==== Boolean signals.disconnectByFunction(Function callback)
+_id|callback_;; The id returned from *connect* or the callback function passed
+to *connect*. Note that if the same callback is used more than once
+the signal must be disconnected by id, otherwise the behaviour is undefined.
****
-disconnect from all signals with matching callback function
-_callback_;; The callback function passed to connect
-_returns_;; true if signals were disconnected, false if no signal
-was disconnected
-****
-==== Boolean signals.disconnectByName(String signal)
+==== void signals.disconnectByName(String signal)
****
-disconnect from all signals with matching name,
+Disconnect from all signals with matching name,
It should be avoided to call disconnectByName
on signals implemented by dwb since it will completely stop the emission of the
signal in all scripts.
diff --git a/api/jsapi.txt b/api/jsapi.txt
index 25eddd9f..81a349a9 100644
--- a/api/jsapi.txt
+++ b/api/jsapi.txt
@@ -2363,34 +2363,16 @@ _returns_;; Overall return value from all connected callback functions
[source,javascript]
----
-Boolean signals.disconnect(Number id)
+void signals.disconnect(Number id|Function callback)
----
-disconnect from a signal
- ::
-
-_id_;; The id returned from <<connect>>
-_returns_;; +true+ if the signal was disconnected, +false+ if the signal
-wasn't found or was already disconnected.
-****
-
-
-****
-[[disconnectByFunction]]
-[float]
-==== *disconnectByFunction()* ====
-
-[source,javascript]
-----
-Boolean signals.disconnectByFunction(Function callback)
-----
-disconnect from all signals with matching callback function
+Disconnect from a signal
::
-_callback_;; The callback function passed to <<connect>>
-_returns_;; +true+ if signals were disconnected, +false+ if no signal
-was disconnected
+_id|callback_;; The id returned from <<connect>> or the callback function passed
+to <<connect>>. Note that if the same callback is used more than once
+the signal must be disconnected by id, otherwise the behaviour is undefined.
****
****
@@ -3750,7 +3732,7 @@ return {
end : function () {
unbind(bar);
- signals.disconnectByFunction(loadStatusCallback);
+ signals.disconnect(loadStatusCallback);
return true;
}
};