A basic Question
-
hi
oh my gosh, is that like a c++ ternary operator that can be nested ?
But its not super readable unless really short. -
It's the same, a c++ ternary operator can be nested.
-
Off-topic but it would be
good = !m_seedsfilter? true : m_seedsfilter == 1 ? newClusters(Sp) : newSeed(Sp);
, it's the same notation in Js and in c++ -
Thanks
but was just live sample from
https://stackoverflow.com/questions/18237432/how-to-rewrite-complicated-lines-of-c-code-nested-ternary-operator/18237507
But back to topic a bit.Do you know how much of JS that is supported in QML ?
Can i include .js stuff ? -
@mrjj said in A basic Question:
Do you know how much of JS that is supported in QML ?
Can i include .js stuff ?I think V4 engine implements full ECMA 5.1 specs, so you can run any JavaScript there, unless it uses newer features.
-
@sierdzio said in A basic Question:
ECMA 5.1 specs
so that is pretty old ?
5.1 Edition / June 2011
https://www.ecma-international.org/ecma-262/5.1/So most from
https://www.javascripting.com/might not work as 6 years in Web tech is a decade ?
-
It is old, indeed. But a lot of projects like node.js, charts.js etc. seem to be working (or used to work 1-2 years back).
There is a ticket for upgrading the engine, but it lays dormant since years https://bugreports.qt.io/browse/QTBUG-47735
-
@mrjj said in A basic Question:
It is odd that its not been updated since lots of activities on QML.
There was a discussion about it on the mailing list once. If I recall it correctly, the priority for Qt devs working on QML was to keep the engine fast, and make it work 100% reliable in common QML use cases (and the most common uses are: small bindings/ assignments and short functions) - so they did not feel pressure to implement newer features.