How to use trace - 10 common examples

To help you get started, we’ve selected a few trace examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tjvantoll / nativescript-flashlight / demo / app / tns_modules / ui / styling / style-scope.js View on Github external
function applyInlineSyle(view, style) {
    try {
        var syntaxTree = cssParser.parse("local { " + style + " }", undefined);
        var filteredDeclarations = syntaxTree.stylesheet.rules[0].declarations.filter(function (val, i, arr) { return val.type === "declaration"; });
        cssSelector.applyInlineSyle(view, filteredDeclarations);
    }
    catch (ex) {
        trace.write("Applying local style failed: " + ex, trace.categories.Error, trace.messageType.error);
    }
}
exports.applyInlineSyle = applyInlineSyle;
github bradyhouse / house / fiddles / nativeScript / fiddle-0008-FifteenPuzzle / fifteenpuzzle / platforms / android / src / main / assets / app / tns_modules / ui / styling / style-scope.js View on Github external
function applyInlineSyle(view, style) {
    try {
        var syntaxTree = cssParser.parse("local { " + style + " }", undefined);
        var filteredDeclarations = syntaxTree.stylesheet.rules.filter(isRule)[0].declarations.filter(isDeclaration);
        applyInlineStyle(view, filteredDeclarations);
    }
    catch (ex) {
        trace.write("Applying local style failed: " + ex, trace.categories.Error, trace.messageType.error);
    }
}
exports.applyInlineSyle = applyInlineSyle;
github bradyhouse / house / fiddles / nativeScript / fiddle-0009-SqliteDb / fifteenpuzzle / platforms / android / src / main / assets / app / tns_modules / ui / styling / style-scope.js View on Github external
function applyInlineSyle(view, style) {
    try {
        var syntaxTree = cssParser.parse("local { " + style + " }", undefined);
        var filteredDeclarations = syntaxTree.stylesheet.rules.filter(isRule)[0].declarations.filter(isDeclaration);
        applyInlineStyle(view, filteredDeclarations);
    }
    catch (ex) {
        trace.write("Applying local style failed: " + ex, trace.categories.Error, trace.messageType.error);
    }
}
exports.applyInlineSyle = applyInlineSyle;
github NativeScript / nativescript-marketplace-demo / app / tns_modules / ui / styling / style-scope.js View on Github external
function applyInlineSyle(view, style) {
    try {
        var syntaxTree = cssParser.parse("local { " + style + " }", undefined);
        var filteredDeclarations = syntaxTree.stylesheet.rules[0].declarations.filter(function (val, i, arr) { return val.type === "declaration"; });
        cssSelector.applyInlineSyle(view, filteredDeclarations);
    }
    catch (ex) {
        trace.write("Applying local style failed: " + ex, trace.categories.Error, trace.messageType.error);
    }
}
exports.applyInlineSyle = applyInlineSyle;
github NativeScript / sample-Groceries / app / tns_modules / ui / styling / style-scope.js View on Github external
function applyInlineSyle(view, style) {
    try {
        var syntaxTree = cssParser.parse("local { " + style + " }", undefined);
        var filteredDeclarations = syntaxTree.stylesheet.rules[0].declarations.filter(function (val, i, arr) { return val.type === "declaration"; });
        cssSelector.applyInlineSyle(view, filteredDeclarations);
    }
    catch (ex) {
        trace.write("Applying local style failed: " + ex, trace.categories.Error, trace.messageType.error);
    }
}
exports.applyInlineSyle = applyInlineSyle;
github bradyhouse / house / fiddles / nativeScript / fiddle-0008-FifteenPuzzle / fifteenpuzzle / platforms / android / src / main / assets / app / tns_modules / ui / frame / frame-common.js View on Github external
}
            moduleExports = global.loadModule(entry.moduleName);
        }
        else {
            var moduleExportsResolvedPath = file_name_resolver_1.resolveFileName(moduleNamePath, "js");
            if (moduleExportsResolvedPath) {
                if (trace.enabled) {
                    trace.write("Loading JS file: " + moduleExportsResolvedPath, trace.categories.Navigation);
                }
                moduleExportsResolvedPath = moduleExportsResolvedPath.substr(0, moduleExportsResolvedPath.length - 3);
                moduleExports = global.loadModule(moduleExportsResolvedPath);
            }
        }
        if (moduleExports && moduleExports.createPage) {
            if (trace.enabled) {
                trace.write("Calling createPage()", trace.categories.Navigation);
            }
            page = moduleExports.createPage();
        }
        else {
            page = pageFromBuilder(moduleNamePath, moduleExports);
        }
        if (!(page && page instanceof page_1.Page)) {
            throw new Error("Failed to load Page from entry.moduleName: " + entry.moduleName);
        }
        var cssFileName = file_name_resolver_1.resolveFileName(moduleNamePath, "css");
        if (cssFileName && !page["cssFile"]) {
            page.addCssFile(cssFileName);
        }
    }
    return page;
}
github bradyhouse / house / fiddles / nativeScript / fiddle-0008-FifteenPuzzle / fifteenpuzzle / platforms / android / src / main / assets / app / tns_modules / ui / frame / frame.js View on Github external
trace.write("Frame _processNavigationContext: Activity.Resumed, Continue", trace.categories.Navigation);
                        }
                        _super.prototype._processNavigationContext.call(_this, navigationContext);
                        unsubscribe_1();
                    }
                };
                var unsubscribe_1 = function () {
                    if (trace.enabled) {
                        trace.write("Frame _processNavigationContext: Unsubscribe from Activity.Resumed", trace.categories.Navigation);
                    }
                    application.android.off(application.AndroidApplication.activityResumedEvent, resume_1);
                    application.android.off(application.AndroidApplication.activityStoppedEvent, unsubscribe_1);
                    application.android.off(application.AndroidApplication.activityDestroyedEvent, unsubscribe_1);
                };
                if (trace.enabled) {
                    trace.write("Frame._processNavigationContext: Subscribe for Activity.Resumed", trace.categories.Navigation);
                }
                application.android.on(application.AndroidApplication.activityResumedEvent, resume_1);
                application.android.on(application.AndroidApplication.activityStoppedEvent, unsubscribe_1);
                application.android.on(application.AndroidApplication.activityDestroyedEvent, unsubscribe_1);
                return;
            }
        }
        _super.prototype._processNavigationContext.call(this, navigationContext);
    };
    return Frame;
github bradyhouse / house / fiddles / nativeScript / fiddle-0009-SqliteDb / fifteenpuzzle / platforms / android / src / main / assets / app / tns_modules / ui / frame / frame.js View on Github external
trace.write("Frame _processNavigationContext: Activity.Resumed, Continue", trace.categories.Navigation);
                        }
                        _super.prototype._processNavigationContext.call(_this, navigationContext);
                        unsubscribe_1();
                    }
                };
                var unsubscribe_1 = function () {
                    if (trace.enabled) {
                        trace.write("Frame _processNavigationContext: Unsubscribe from Activity.Resumed", trace.categories.Navigation);
                    }
                    application.android.off(application.AndroidApplication.activityResumedEvent, resume_1);
                    application.android.off(application.AndroidApplication.activityStoppedEvent, unsubscribe_1);
                    application.android.off(application.AndroidApplication.activityDestroyedEvent, unsubscribe_1);
                };
                if (trace.enabled) {
                    trace.write("Frame._processNavigationContext: Subscribe for Activity.Resumed", trace.categories.Navigation);
                }
                application.android.on(application.AndroidApplication.activityResumedEvent, resume_1);
                application.android.on(application.AndroidApplication.activityStoppedEvent, unsubscribe_1);
                application.android.on(application.AndroidApplication.activityDestroyedEvent, unsubscribe_1);
                return;
            }
        }
        _super.prototype._processNavigationContext.call(this, navigationContext);
    };
    return Frame;
github NativeScript / nativescript-marketplace-demo / app / tns_modules / ui / frame / frame-common.js View on Github external
if (!(page && page instanceof pages.Page)) {
            throw new Error("Failed to create Page with entry.create() function.");
        }
    }
    else if (entry.moduleName) {
        var currentAppPath = fs.knownFolders.currentApp().path;
        var moduleNamePath = fs.path.join(currentAppPath, entry.moduleName);
        var moduleExports;
        var moduleExportsResolvedPath = fileResolverModule.resolveFileName(moduleNamePath, "js");
        if (moduleExportsResolvedPath) {
            trace.write("Loading JS file: " + moduleExportsResolvedPath, trace.categories.Navigation);
            moduleExportsResolvedPath = moduleExportsResolvedPath.substr(0, moduleExportsResolvedPath.length - 3);
            moduleExports = require(moduleExportsResolvedPath);
        }
        if (moduleExports && moduleExports.createPage) {
            trace.write("Calling createPage()", trace.categories.Navigation);
            page = moduleExports.createPage();
        }
        else {
            page = pageFromBuilder(moduleNamePath, moduleExports);
        }
        if (!(page && page instanceof pages.Page)) {
            throw new Error("Failed to load Page from entry.moduleName: " + entry.moduleName);
        }
    }
    return page;
}
exports.resolvePageFromEntry = resolvePageFromEntry;
github NativeScript / nativescript-app-templates / packages / template-hello-world / tns_modules / ui / frame / frame-common.js View on Github external
if (!(page && page instanceof pages.Page)) {
            throw new Error("Failed to create Page with entry.create() function.");
        }
    }
    else if (entry.moduleName) {
        var currentAppPath = fs.knownFolders.currentApp().path;
        var moduleNamePath = fs.path.join(currentAppPath, entry.moduleName);
        var moduleExports;
        var moduleExportsResolvedPath = resolveFilePath(moduleNamePath, "js");
        if (moduleExportsResolvedPath) {
            trace.write("Loading JS file: " + moduleExportsResolvedPath, trace.categories.Navigation);
            moduleExportsResolvedPath = moduleExportsResolvedPath.substr(0, moduleExportsResolvedPath.length - 3);
            moduleExports = require(moduleExportsResolvedPath);
        }
        if (moduleExports && moduleExports.createPage) {
            trace.write("Calling createPage()", trace.categories.Navigation);
            page = moduleExports.createPage();
        }
        else {
            page = pageFromBuilder(moduleNamePath, moduleExports);
        }
        if (!(page && page instanceof pages.Page)) {
            throw new Error("Failed to load Page from entry.moduleName: " + entry.moduleName);
        }
    }
    return page;
}
exports.resolvePageFromEntry = resolvePageFromEntry;

trace

Creates super long stack traces

MIT
Latest version published 30 days ago

Package Health Score

75 / 100
Full package analysis

Popular trace functions