Re: Event questions.

Mark Birbeck wrote:
> 
> Hi Steven,
> 
>> XML Events says that an element defaults to a handler for an event if it
>> doesn't have a handler attribute on it.
>> http://www.w3.org/TR/xml-events/Overview.html#section-attributedefaulting
> 
> Indeed...but the reason it's an interesting question is that
> xf:message is a handler *anyway*. The action must implement the
> handleEvent() method in order to be a handler, and this can't be
> applied later--it must be there regardless of the ev:* attributes
> present.
> 
> I've just remembered that in a related discussion at the FtF before
> last, I suggested that @handler is actually only needed on the
> ev:listener element, and isn't needed elsewhere, and my vague
> recollection is that this is the reason why.
> 
> It seems to me wrong to ignore the fact that xf:message is a handler
> in its own right, so I think we should either execute *both* handlers,
> or we should say that @ev:handler is not allowed on action handlers.
> (The second solution seems more correct to me.)
> 
> Regards,
> 
> Mark
> 
> 
Hi Mark,

I would agree with you if the XML Event spec weren't already published. 
  Then perhaps we could word things in that spec in such a way to allow
for the possibility that ev:Xxxx might not be allowed on some elements. 
  But putting limitations on XML Events via the XForms spec doesn't feel
right to me and isn't in the spirit of the XML Events spec as it stands
now.  Perhaps we just need some sort of note in Section 10 or 10.1 to
tell what happens if @ev:handler is used on an xforms action.

So as the XML Event spec reads now, I would agree with Stephen.  You are
correct in saying that xf:message is a handler, but like Stephen points
out in his example, it is not the handler for any
registered listener in the example given and thus I don't think it
should fire.

Those are my 2 pence, at least.

--Aaron

Received on Monday, 31 July 2006 19:37:40 UTC