Subj : Re: [Rhino] can you add default getters/setters? To : Mike C. From : Igor Bukanov Date : Fri May 07 2004 11:30 am Mike C. wrote: > "Igor Bukanov" wrote > >>It is not possible in Rhino without parser modifications to support >> Session("key") = "val"; >>since in JS lvalue can only be either variable name or property >>reference. > > > Yes I have noticed that ;) Guess its in the ECMA standard. > Same thing goes with the MS JScript: > > var obj = new Object; > function test(key) > { > return obj["x_" + key]; > } > test("1") = 2; // can we assign to obj["x_1"] ? > > Gives an error: > Microsoft JScript runtime error '800a138b' > Cannot assign to a function result > > But Microsoft makes an exception for COM objects, so there goes one in my > wishlist: can you make an exception for Java Objects, and move this error > check from parsing to runtime introspection? It would require substantial changes to parsing and code generation. But why do you need this feature? Do you want to implement ASP support in Java? Regards, Igor .