imports/vx/client/code/vxapp.js
/**
     * Test a given function by executing it and display a helpful notification.
     *
     * @param {string} functionString Function as string.
     */
Test a given function by executing it and display a helpful notification.
@param {string} functionString Function as string.
Test a given function by executing it and display a helpful notification . @param { string } functionString Function as string .
async testFunction(functionString) {
        try {
            try {
                const data = VXApp.functionTestDataDefault()
                console.log("VXApp.testFunction data", data)
                const result = await VXApp.eval(functionString, data)
                UX.notify({ success : true, icon : "CALCULATOR", key: "common.alert_function_valid" })
                console.log("Function test successful - return value:", result)
            }
            catch (error) {
                UX.notifyForError(error)
            }
        }
        catch (error) {
            UX.notifyForError(error)
        }
    }
async testFunction ( functionString ) { try { try { const data = VXApp . functionTestDataDefault ( ) console . log ( "VXApp.testFunction data" , data ) const result = await VXApp . eval ( functionString , data ) UX . notify ( { success : true , icon : "CALCULATOR" , key : "common.alert_function_valid" } ) console . log ( "Function test successful - return value:" , result ) } catch ( error ) { UX . notifyForError ( error ) } } catch ( error ) { UX . notifyForError ( error ) } }
Test a given function by executing it and display a helpful notification.
Test a given function by executing it and display a helpful notification .