Why can't I create hashes where the keys are variables?

  var klass = Class.create(
   initialize: function() {
      this.field = new Hash({klass.staticVar: 999});
   }
  );
  klass.staticVar = 888;

  SyntaxError: missing : after property id {  message="missing : after
property id",  more...}

I can only get rid of the error when use resolved primitives as the
keys:

  var noError = new Hash({'primitive': 999});

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to