[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: plasma.include() and member visibility
From:       J Janz <jj () juniorjanz ! net>
Date:       2010-01-16 13:22:30
Message-ID: eebd8d1b1001160522l35a384cla3978a2f6f2b4e80 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2010/1/15 Aaron J. Seigo <aseigo@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 withou=
t
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 include=
d
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 patc=
h
it).

That's what I suggest.

Cheers,
--
J (|=B4:=AC{)=BB
---------------------------------------------
"Eu sou a ressurrei=E7=E3o e a vida. Quem cr=EA em mim, ainda que morra, vi=
ver=E1; e
todo o que vive e cr=EA em mim n=E3o morrer=E1, eternamente. Cr=EAs isto?"
O Senhor, Jesus Cristo - Jo.11:25-26
---------------------------------------------

[Attachment #5 (text/html)]

<div class="gmail_quote">2010/1/15 Aaron J. Seigo <span dir="ltr">&lt;<a \
href="mailto:aseigo@kde.org" \
target="_blank">aseigo@kde.org</a>&gt;</span><br><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;">


<div><div></div><div><br>
</div></div>it is a scoping problem. declaring &quot;var name&quot; means that the \
&#39;name&#39; variable<br> is local to that context (the file in this \
case).</blockquote><div><br>Well, it&#39;s true. That&#39;s actually how JS works, \
so, not using var would be the way to go. I, however, don&#39;t see how it would work \
for functions without assigning them to variables or the plasmoid.<br>

</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>to me it sounds<br> like a \
problem waiting to happen:<br></blockquote><div><br>Yes, it is. It could could \
completely mess up with any computing you might be doing (it&#39;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&#39;t patch it).<br>

<br>That&#39;s what I suggest.<br><br>Cheers,<br clear="all">--<br>J \
(|´:¬{)»<br>---------------------------------------------<br>&quot;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?&quot;<br>O Senhor, Jesus Cristo - \
Jo.11:25-26<br>---------------------------------------------<br> </div></div>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic