Can't access 'busy' variable in new FuseJS model code

I’m not sure, but I think this may be a bug. I have a simple application using the new FuseJS model code.

In MainView.ux I have reduced it to just the following:

<App Model="MyApp">
    <Busy ux:Name="isBusy" IsActive="false" />	
</App>

In MyApp.js, I just have

this.isBusy.activate()
export default class MyApp {
    constructor() {
    }
}

or

isBusy.activate

Neither works (isBusy is not defined)

Putting it into a method of the class doesn’t seem to make any difference.

Update: You can get isBusy from normal Javascript, but I can’t figure out how to get it from there and into the model. Any guidance would be appreciated. Thanks!

I found a workaround, which is probably the desired way to do this with the new Model framework. It turns out one can do <Busy IsActive="{busy}"/> where {busy} can be a property of the model, e.g.

export default class LoginPage {
    constructor() {
        this.busy = false
    }

    submit() {
        this.busy = true
    }
}

Hi Vlad,

we’re currently working on variable injection on Model, and the new approach should be available in a near-future release of Fuse.

Here’s an early sneak peek of how that will look.

Cool, thanks!