W3C home > Mailing lists > Public > public-xformsusers@w3.org > June 2017

Re: Events after xforms-disabled

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Tue, 06 Jun 2017 16:52:25 +0200
To: " XForms" <public-xformsusers@w3.org>
Message-ID: <op.y1e19nolsmjzpq@steven-xps>
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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 June 2017 14:53:11 UTC