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;
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;