FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Not returning a view on the view parameter of the creatingView event handler of the placeholder crash the application · Issue #343 · NativeScript/NativeScript · GitHub

Not returning a view on the view parameter of the creatingView event handler of the placeholder crash the application #343

Description

How to reproduce:
Create an xml page with the following nested elements:
Page
StackLayout
Placehodler

Add an event handler to the creatingView placeholder event named creatingImageView such as:
function creatingImageView(args) {
console.log("Creating View called");
}
exports.creatingImageView = creatingImageView;

Run the application it will crash with the following error:
/app/tns_modules/ui/core/view.js:85:116: JS ERROR Error: onMeasure() did not set the measured dimension by calling setMeasuredDimension()

replace the event handler with the following code and the application will start
function creatingImageView(args) {
console.log("Creating View called");
var nativeView = new UILabel();
nativeView.text = "Native";
args.view = nativeView;
}
exports.creatingImageView = creatingImageView;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL