plasma.include() and member visibility

Amos Kariuki amoskahiga at gmail.com
Thu Jan 14 17:21:15 CET 2010


I’m trying to create a javascript plasmoid with multiple modules.  My
main.js file includes another script file; my problem is that I’m unable to
reference the variables and functions declared in the included file.
Example:

[lib.js]
var name = “Amos”;


[main.js]
plasmoid.include(“lib.js”);
print(name);

When I run the plasmoid, I get a message stating that x is undefined.  I’m I
referencing the variables incorrectly or is there some other way to achieve
what I want?

Thanks,
Amos Kariuki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100114/6e52cf59/attachment.htm 


More information about the Plasma-devel mailing list