Re: empty fields in SCXML events.

Le 5 apr 2013 à 16:46, Jim Barnett a écrit :

> The spec defines a set of standard fields in events, such as sendid, etc., and then defines conditions under which they should be left ‘emtpy’.  In the ECMAScript data model, we say that “name,type, sendid, origin, origintype, and invokeid are String values, while data is an Object value.”   So what should their values be when they are left ‘empty’?

String -> "", obviously
Object -> null or {}

The question for Object is what you want to get if you evaluate it as a condition. null is a falsy value, while {} converts to true. But {} is more of an "empty object" than null so I like it better.

			David

Received on Friday, 5 April 2013 15:53:30 UTC