Skip to content

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

@AlexandreRoba

Description

@AlexandreRoba

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;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions