Iterators and Generators in AppStudio

By Stephen Quan in AppStudio
31 Jul 2019

I posted “Hello World” in BASIC (Iterators and Generators in AppStudio) on GeoNet AppStudio Blog Posts.


‘for of’ loops and destructuring in AppStudio

By Stephen Quan in AppStudio
17 Jul 2019

I posted “for of” loops and destructuring in AppStudio on GeoNet AppStudio Blog Posts.


InputValidators in AppStudio

By Stephen Quan in AppStudio
27 Jun 2019

I posted AppStudio_InputValidator.qml on GitHub Gist which demonstrates an InputValidator on a TextField.


Sorting QML ListModels

By Stephen Quan in AppStudio
19 Jun 2019

I posted Sorting QML ListModels on GeoNet AppStudio Blog Posts.

    function listModelSort(listModel, compareFunction) {
        let indexes = [ ...Array(listModel.count).keys() ]
        indexes.sort( (a, b) => compareFunction( listModel.get(a), listModel.get(b) ) )
        let sorted = 0
        while ( sorted < indexes.length && sorted === indexes[sorted] ) sorted++
        if ( sorted === indexes.length ) return
        for ( let i = sorted; i < indexes.length; i++ ) {
            listModel.move( indexes[i], listModel.count - 1, 1 )
            listModel.insert( indexes[i], { } )
        }
        listModel.remove( sorted, indexes.length - sorted )
    }

Promises in AppStudio

By Stephen Quan in AppStudio
05 Jun 2019

I posted Promises in AppStudio on GeoNet AppStudio Blog Posts.