Hi,
has anyone here experience with accessing the $public object of the javascript API ?
It is possible to get access to that object inside a javascript node in a logic flow, but each block and screen have their own $public, and it is not accessible through a reusable client action.
I am trying to get a reference to all of the $public objects that exists in an application (so all blocks and the screen) The only way I have found so far, is to put a javascript node in each blocks OnReady handler.
That works fine, but it is a hassle to do, so does anybody know of how to get to them in another way ?
Dorine
Hi Dorine,
I don't understand the question. The JavaScript object $public, is a public object injected by OutSystems framework, and available in each JavaScript node for mobile and reactive screens. The React framework is a single-page-app framework, not all screen and block assets will be available at a single point in time.
What is your use case?
Regards,
Daniel
Hi Daniël Kuhlmann ,Dorine is expecting that,
The problem with this approach is that to write code in every block to pass on it's $public to where dorine want to do something with them. Dorine is interested in the whole collection that is available, and don't want to have to write some code for that in every single screen and block.
Thanks,
Ajit Kurane.
I understand Ajit, and that is an OutSystems limitation that you cannot overcome differently. My only question is what is the use case.
My use case is this :
I am trying to make a component to show/log/edit any variable, as a tool for troubleshooting and testing, a (lightweight) alternative/complement to the debugger.
I want to make it as little work as possible to use it.