Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] difficulties porting plugin to Orion 4.0 RC2

Hi all.

I am in the process of porting a plugin from Orion 1.0 (RC2) to Orion
4.0 (RC2). Right now I am having a hard time getting the plugin to
work with the new plugin.js. I am by no means experienced with JS so
that is probably the reason of my struggle. But I am seeing the
plugin.js ending up with the "Deferred" symbol being undefined.
Basically, in this code:

    if (typeof define === "function" && define.amd) { //$NON-NLS-0$
        define(["orion/Deferred"], factory);
    } else if (typeof exports === "object") { //$NON-NLS-0$
        module.exports = factory(require("orion/Deferred"));
    } else {
        root.orion = root.orion || {};
        root.orion.PluginProvider = factory(root.orion.Deferred);

the last else is the block executing, and since root.orion is
undefined, it falls back to {}, so root.orion,Deferred of course will
be undefined as well.

I suspect that my root issue may originate before this initialization
code runs but I have no idea of what it is. Any tips?


Back to the top