ERROR: Not handled: OnNewAll

This code worked on 0.24 but explodes after my upgrade:

Fuse 0.25.0 (build 7511)

<Page ux:Name="eventList" Background="#000">
    <JavaScript>
        var Observable = require("FuseJS/Observable")
        exports.listData = Observable()

        for (var i = 2015; i < 2100; i++) {
            exports.listData.add({year_nr: i, type: 'year'})
        }

    </JavaScript>

    <ScrollView>
        <StackPanel Color="#fff" ItemSpacing="1">
                
            <Each Count="{listData}">

                <Deferred>
                    <Panel Height="60" Color="#bbb">
                        <Text Value="{year_nr}" Alignment="CenterLeft" />
                    </Panel>
                </Deferred>


            </Each>

        </StackPanel>
    </ScrollView>
</Page>

Could be related to this:
https://www.fusetools.com/community/forums/bug_reports/not_handled_onnewall_error

Hey Sebastian, and thanks for your report. That looks like a bug to me, so I’ve created an internal issue. We’ll keep you posted!

Awesome!

Hi!

You are databinding a list to a property Count that expects an int.

I think you want to change

<Each Count="{listData}">

into

<Each Items="{listData}">

And it should work. No idea how this code could have ever worked in 0.24.

Hope this helps!

(PS: Thanks for the test case, will improve the error messages for future versions)

The new error message now reads:

Cannot bind 'listData' to property 'Count'. The observable must contain exactly one number.

My bad! The reason it worked in 0.24 was because I initially bound it to Items and then changed during some experimenting to Count when I was trying to figure out what was causing poor performance in lists (turned out to only affect Preview). So yeah, a better error message would be… great! :smiley: