

Re: "count" attribute in catch?

From: Markku Savela <msa@msa.tte.vtt.fi>
Date: Fri, 14 Dec 2001 15:07:10 +0200
Message-Id: <200112141307.PAA28830@msa.tte.vtt.fi>
To: www-voice@w3.org

Ok, I missed something in section 5.2.4 ...

   1. Form an ordered list of catches consisting of all catches in the
      current scope and all enclosing scopes (form item, form,
      document, application root document, interpreter context),
      ordered first by scope (starting with the current scope), and
      then within each scope by document order.

   2. Remove from this list all catches whose event name does not
      match the event being thrown or whose cond evaluates to false.

   3. Find the "correct count": the highest count among the catch
      elements still on the list less than or equal to the current
      count value.

   4. Select the first element in the list with the "correct count".

I'm not sure I like this. The step (3) does resolve the problem, but
causes some fancy processing back and forth through the active
catchers. I was visualizing a stack containing the currently relevant
catch elements, and throw would simply go through them in order and
process the first that matches count/condition and event.

Step (3) forces me scan through *all* of the list every time, and keep
track of the "best", and at the end come back to the "best" catch
element, and run it...

Oh well, if this is it, I guess I have to code some more stuff... I
suppose there is some subtle points that make the definition as is
Received on Friday, 14 December 2001 09:09:32 UTC
