Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorsuthern
     
    Ok, I've got an odd one. In trying to create complex associations, I ran across the following:

    This does not return any errors:
    var $has_many = "conditions,spots,parts_vendors,groups,groups_parts,vendors";

    But THIS does:
    var $has_many = "conditions".",spots,parts_vendors,groups,groups_parts,vendors";
    Error: Parse error: syntax error, unexpected '.', expecting ',' or ';' in...

    My question is WHY? Is it impossible to declare concatenated variables? I know in regular string handling, ("cat"." that") = ("cat that"). Hmm. Learn something new every day I guess.

    And now I feel dumb for asking this question. Is there a way to delete it?
    • CommentAuthoraekko85
     

    From what I experienced, it is not possible to declare variables while evaluating expressions.

    Meaning :

     var $foo = 2;         //ok
     var $foo = 1 + 1;     //syntax error
    

    I don't know why and find it quite annoying.

    • CommentAuthorsuthern
     

    Perhaps it has historical reasons. Who knows.