[Kss-devel] continueEvent issue
Balazs Ree
ree at ree.hu
Sun Mar 9 19:26:44 CET 2008
On Sun, 09 Mar 2008 11:20:50 +0100, Malthe Borch wrote:
> I'm trying to get the annoyClicker-example to work. This is my plugin
> source:
>
> http://paste.plone.org/20033
>
> I'm using it with these rules:
>
> #region-inspector .inspectorActions
> a.deleteButton:selective-click(delete) {
> evt-selective-click-count: 2;
> }
>
> behavior:selective-doit(delete) {
> action-server: deletePage;
> }
>
> But I get this error message:
>
> [Exception... "'Error: Could not trigger event name [doit] on namespace
> [selective], because there is neither an explicit KSS rule, nor a
> default method' when calling method: [nsIDOMEventListener::handleEvent]"
> nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location:
> "<unknown>" data: no]
The full, dashed namespace name must be used in the continueEvent call.
this.continueEvent('selective-doit', oper.node, {});
and
this.continueEvent('selective-annoy', oper.node, {});
As a main rule, kss names (events, actions and all) always require their
fully namespaced (dashed) form. (This was not a strict policy earlier,
and I believe that the current way of handling is more logical and also
simplified the kss core code.)
For example:
"doit" would be a name in the default namespace, which is
not defined
"selective-doit" is the doit event in the "selective" namespace
In the future we may also support namespaces with more levels (it is just
a question of decision, because the code can already support this).
(As a little annoyance, no BBB could be provided in this case, but this
part of the api was also not officially stable and documented either.)
It may be a good idea to add a hint about the namespace issue at the end
of this error message though.
--
Balazs Ree
More information about the Kss-devel
mailing list