Re: Events after xforms-disabled

A control is currently either enabled or disabled.
The new state after a refresh will be either enabled or disabled.

It seems to me that this is what you would expect to happen:

     state=disabled & new-state=disabled:
 do nothing
     state=disabled & new-state=enabled:
 enable control
 dispatch enabled event
 dispatch other events as necessary   
     state=enabled & new-state=enabled:
 dispatch other events as necessary
     state=enabled & new-state=disabled:
 dispatch disabled event
 disable control

The problematic case seems to be the last one, where the disabled event  
has to be synchronous.

One possible solution would be to change xforms-enabled and  
xforms-disabled from being notification events, to making them events with  
effect, namely to enable or disable a control, and non-cancellable.

Then the above scheme would look like this:

     state=disabled & new-state=disabled:
 do nothing
     state=disabled & new-state=enabled:
 dispatch enabled event
 dispatch other events as necessary   
     state=enabled & new-state=enabled:
 dispatch other events as necessary
     state=enabled & new-state=disabled:
 dispatch disabled event

Thoughts?

Steven

Received on Tuesday, 6 June 2017 14:53:11 UTC