Skip to content

Tap Event Does Not Fire When Using codeFile In Different Directory #1667

@ghost

Description

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Yes.

Tell us about the problem

tap event does not fire when the main XML's codeFile is in a different directory than the XML. Page element's loaded event seems to work fine.

For example, if the main module is views/launches/default and it loads the XML. The Page tag has a codeFile attribute pointing to controllers/launches/default.

The tap event exported from this codeFile never runs. If the codeFile is in the same directory as the XML it works without any problems.

Which platform(s) does your issue occur on?

Both.

Please provide the following version numbers that your issue occurs with:

  • CLI: 1.6.1

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

<!-- file: views/launches/default.xml -->
<Page codeFile="~/controllers/launches/default">
    <Button text="Tap" tap="tapp" />
</Page>
// file: views/launches/default.js

"use strict";

exports.tap = function(args) {
    console.log("tap event fires!"); // never fires...
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions