OpenUI5 externs - Problem

Hi all Haxians,

at work we will start using sapui5/openui5. It’s written in JS and for learning Reasons I wanted to build some Haxe externs.

Everything works fine for now. I could write some applications and they worked. I found a Haxe-Solutions for most of the cases in the Framework.

Now i’m struggling with a Problem and find no solutions. So here is my Question:

In OpenUI5 you can write Controllers for Views. These Controllers are seperated Files and look like this.

sap.ui.define([
	"sap/m/Text"

], function (Text) {
	"use strict";

	new Text({
		text: "Hello World"
	}).placeAt("content");

});

I thought I can use Compiling libraries without main class, but the output looks different and i get the Error “Module ‘sap/ui/demo/walkthrough/index.js’ returned no content, but should export to global? - sap.ui.ModuleSystem”

Now my question: is there a possibility to use Haxe to build such controllers. With macros? (i didn’t use macros so far)

My Problem is this is no class, so i cannot create the code like this.

Anyone an idea?

Thank you all! :slight_smile:

1 Like