Re: [SailfishDevel] Page Status code
On Thu, 13 Feb 2014 00:19:42 +0100 Thomas Perl th.p...@gmail.com wrote: On 2014-02-12 20:36, Chris Walker wrote: In the past (Harmattan code), I would have done this sort of stuff :- onStatusChanged: { if (status==PageStatus.Activating) { but there is no 'onStatusChanged' option now. So what do I use now? I've looked here - https://sailfishos.org/sailfish-silica/qml-sailfishsilica-page.html but it doesn't mention that status directly. In QML, every property automatically has a on[Property]Changed signal, and those signals are not documented, because the language itself defines that such signals always exist for each property and therefore do not need to be documented explicitly. The documented status property will - when changed - cause the onStatusChanged handler to be called. From http://qt-project.org/doc/qt-5.0/qtqml/qtqml-syntax-objectattributes.html#property-change-signal-handlers: Signal handlers for property change signal take the syntax form /onPropertyChanged/ where /Property/ is the name of the property, with the first letter capitalized. For example, although the TextInput http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-textinput.html type documentation does not document a textChanged signal, this signal is implicitly available through the fact that TextInput http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-textinput.html has a text http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-textinput.html#text-prop property and so it is possible to write an onTextChanged signal handler to be called whenever this property changes [...] So the code as written above (onStatusChanged) should in fact work as-is. HTH :) I'll add all that to yet more stuff to learn :-) Many thanks. ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Page Status code
it's still there and working. no idea what wrong with your setup On 13.02.2014 01:36, Chris Walker wrote: In the past (Harmattan code), I would have done this sort of stuff :- onStatusChanged: { if (status==PageStatus.Activating) { but there is no 'onStatusChanged' option now. So what do I use now? I've looked here - https://sailfishos.org/sailfish-silica/qml-sailfishsilica-page.html but it doesn't mention that status directly. Any help appreciated. ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Page Status code
On 2014-02-12 20:36, Chris Walker wrote: In the past (Harmattan code), I would have done this sort of stuff :- onStatusChanged: { if (status==PageStatus.Activating) { but there is no 'onStatusChanged' option now. So what do I use now? I've looked here - https://sailfishos.org/sailfish-silica/qml-sailfishsilica-page.html but it doesn't mention that status directly. In QML, every property automatically has a on[Property]Changed signal, and those signals are not documented, because the language itself defines that such signals always exist for each property and therefore do not need to be documented explicitly. The documented status property will - when changed - cause the onStatusChanged handler to be called. From http://qt-project.org/doc/qt-5.0/qtqml/qtqml-syntax-objectattributes.html#property-change-signal-handlers: Signal handlers for property change signal take the syntax form /onPropertyChanged/ where /Property/ is the name of the property, with the first letter capitalized. For example, although the TextInput http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-textinput.html type documentation does not document a textChanged signal, this signal is implicitly available through the fact that TextInput http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-textinput.html has a text http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-textinput.html#text-prop property and so it is possible to write an onTextChanged signal handler to be called whenever this property changes [...] So the code as written above (onStatusChanged) should in fact work as-is. HTH :) Thomas ___ SailfishOS.org Devel mailing list