On Monday 31 October 2011, Aaron J. Seigo wrote: > On Monday, October 31, 2011 10:12:57 Marco Martin wrote: > > when is not an applet (ie just qmlviewer, or qml packages), a package may > > or may not be there > > this is one of the things i really, really liked about how Packages are > implemented in the Javascript API. anything can register a Package at a > given place in the Context hierarchy, and then such searches simply scan > the Context stack for Packages, checking each along the way. > > it's elegant, extensible and future proof. > > too bad the people working on QML (and as i understand, V8 as well which > lacks the concept of a context stack in its implementation?) "know better" > so we'll likely lose this in future. straight from the "amazingly > disapointing" files.
yeap, that's one of the reasons i'm quite hesitant doing any new work on the qscriptengine right now. what could be tried, afaik on the public c++ side qml2 shouldn't change much, so the qdeclarativecontext should still exist (their implementation of context that no, isn't *exactly* a context of the qscriptengine :p) so we could register there a qobject with id "package", so any reference to package in child objects would go to that one Cheers, Marco Martin _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel