2010/1/15 Aaron J. Seigo <ase...@kde.org>

>
> it is a scoping problem. declaring "var name" means that the 'name'
> variable
> is local to that context (the file in this case).


Well, it's true. That's actually how JS works, so, not using var would be
the way to go. I, however, don't see how it would work for functions without
assigning them to variables or the plasmoid.

>
> to me it sounds
> like a problem waiting to happen:
>

Yes, it is. It could could completely mess up with any computing you might
be doing (it's not really hard to be using the same var names in an included
file and inside a function somewhere else) and also, as you exemplified,
final results. I suppose it was not well thought at the time of that
writing. Maybe that should get fixed instead of this (so, please don't patch
it).

That's what I suggest.

Cheers,
--
J (|´:¬{)»
---------------------------------------------
"Eu sou a ressurreição e a vida. Quem crê em mim, ainda que morra, viverá; e
todo o que vive e crê em mim não morrerá, eternamente. Crês isto?"
O Senhor, Jesus Cristo - Jo.11:25-26
---------------------------------------------
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to