Skip to Content
1
May 01, 2015 at 06:23 AM

Designs Studio 1.4 - Is it possible to instantiate a new component with a global script function?

41 Views

Hi,

Global script functions allow a component object as a Return Type. I have noticed that it only seems to be possible to return a component that already exists when defining such a function, as in the example shown below:

While this may have it's use cases, since an existing component can be addressed directly anyway, I would have thought it would be of more value to have the ability to instantiate new components with global script functions, for the purposes of dynamic UI generation as one example.

Does anyone know if this is possible and if so what is the correct syntax for the return statement in the global script function definition to achieve it?

Thanks,

Mustafa.

Attachments