📌 Issue: When using app.LoadScript() or app.Include() in DroidScript, loaded scripts cannot access app in the compiled app, even though they work correctly in test mode.
📌 Example:
// In main.js
app.LoadScript("views/inicio.js", function() {
MostrarBoton(); // Error: function not found
});
// In views/inicio.js
function MostrarBoton() {
var layout = app.CreateLayout("linear", "VCenter,FillXY"); // Error: "app.CreateLayout is not a function"
app.AddLayout(layout);
}
// In views/inicio.js
function MostrarBoton() {
var layout = app.CreateLayout("linear", "VCenter,FillXY"); // Error: "app.CreateLayout is not a function"
app.AddLayout(layout);
}
How can we ensure that scripts loaded via LoadScript() or Include() can access app in the compiled app?