Set method for Map

We'll add Set/Get methods in the next update. We'll also make it so that [] works in some cases - it will work with key names that begin with an underscore (e.g. map["_moo"]) , as well as completely numeric key names (e.g. map[123]).

The problem with using [] generally with our Map object is that Active Scripting doesn't distinguish between object.name and object["name"] at all. We have no way to tell which form has been used. This is fine for vectors which have numeric indices but maps use string keys, and so we felt this would be confusing and/or dangerous (e.g. imagine trying to use the string "clear" as a map key).

3 Likes