if i define a function testfunc() in plasmoid /contents/main.js, when user add two instances of my plasmoid to taskbar, in these two instances, is function testfunc() a same object?

Marco Martin notmart at gmail.com
Mon May 13 15:15:52 UTC 2013


On Monday 13 May 2013, bruce wrote:
> 
> if i define testfunc.PROPERTY1=1, is it a same
> property?_______________________________________________Plasma-devel
> mailing list
> 
> Plasma-devel at kde.org[2]
> https://mail.kde.org/mailman/listinfo/plasma-devel[3]
>
> my purpose is finding a variable or anything similar which exists in
> different instances of a plasmoid, similar with shared memory between
> processes, shared object between java threads, etc.

plasmoids are supposed to be at least a bit sandboxed and not supposed to 
shareglobal statics or stuff like that.

on the other hand dataengines have usually only one instance for each, 
regardless how many plasmoids are using them

as usual what should be done is to step back and look exactly what you want to 
do, what your final result in terms of functionality should be, rather than 
starting from a possible solution

-- 
Marco Martin


More information about the Plasma-devel mailing list