Hopbot log for 2008-12-30 - Helma IRC channel: #helma on irc.freenode.net

2008-12-30:

[6:13] <forthepoets> hello
[18:10] <jirkap> hello, I have a question: how can I convert macro attribute passed to macro as a parameter to a variable name in javascript? I am aware of eval() but i read everywhere it is bad solution, I couldn't find any alternative though.
[18:11] <jirkap> I should probably be more specific: the attribute is x="req.data", and I want the function to return req.data, but it returns 'req.data' (string)
[18:46] <jirkap> or does eval() mean any harm in this case?
[22:30] <zumbrunn> jirkap: the question is whether you can trust the skin
[22:30] <zumbrunn> assuming you can, I see no harm in using eval
[22:31] <zumbrunn> having said that, in this particular case, you could try global['req.data'] as an alternative
[22:36] <zumbrunn> well, no, you would have to split the string so you get global['req']['data']
[22:36] <zumbrunn> but you get the idea

 

 

In the channel now:

Logs by date: