Support for v6.x of our Scheduling components


Post by mcm »

I have a problem with a changing meaning of "this".
We have updated a solution to typescript from javascript but our scheduler is proving really difficult as the meaning of "this" changes after the update.
I have attatched a picture where you can see that 1. "this" in typescript(new) and refers to the innerTpl() itself. But in 2. (old, javascript) "this" refers a data record containing relevant information
3 Is the code with changing behavior.

Image

For context, this is what I am trying to achieve (And worked in our old solution)
Image


Post by mats »

Please show the TS you wrote that broke things and the old code so we can compare.


Post by mcm »

Hello Mats, thanks for answering.
That would be quite difficult as the entire solution have changed, this is a migration that have been in progress for a years time now, and we first now realized we were missing the prices in the cells.

I have been trying to figure out how/when resurceZonesConfig is called in order to maybe realize how to parse parameters to it.


Post by mats »

Ok very hard to help you without seeing the actual code....


Post by mcm »

In other words, I can see that the property resourceZonesConfig is used internally by the scheduler only.
When resourceZonesConfig.innerTpl() is called, the "this" contexts inside innerTpl() should stay the same, right?


Post by mats »

Yes


Post Reply