On Monday 14 September 2009, Tommi Mikkonen wrote: > Aaron J. Seigo wrote: > > On September 14, 2009, Tommi Mikkonen wrote: > >> Having said that, what I would also like is a harmonized API; having > >> finally spend some hours tonight (after traveling in conferences for > >> some weeks!) on JS Plasmoid development with Lively content, I > >> constantly seem to have problems on the names of widget types etc. > > > > can you provide some concrete examples? > > QFrame vs. Frame and QWebView vs. Webview is QtScriptGenerator and > Plasmoids, and at the same time QtVertical in native Qt, the type names of the plasma widgets are the same in the c++ api and the simplified js api. plasma classes don't have a letter prefix since we have the Plasma:: namespace > QtScriptGenerator and Plasmoids. Another issue is with types when > adding a Qt widget that has been instantiated in C++. At least > http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/CheatSheet > documents that at times a QPainter etc is expected as parameter whereas > Plasma uses name Painter etc. As the error message I get is 'script > could not be initialized' or something similar when misspelling a class > name, it is very frustrating to debug API usage. > > This is not a major issue, and any convention will be ok for me. > However, if we have two scripting systems --- one wirh privileges and > another without --- it will be confusing if type names etc. are > different. An additional issue is that if we have these two sets, the > restricted one should not fail without error messages if someone tests > privileged APIs but give an error message etc. > > Personally, I can live with either API; both are probably fine for most > developers but there should only be one. In a perfect world, we could > have two, one for privileged apps and the other for regular ones. I am > however worried that this will complicate the view a casual developer > will get to Plasma widget development. > > tjm > > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel
-- Marco Martin _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel