ListView bug ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ListView bug ?

Chris Uppal-3
I'm not certain, but I think the following's a bug in non-virtual ListView.

    p := ListPresenter
                show: 'Enhanced list view'
                on: (ListModel on: #(1 2 3 4 5 6 7 8 )).
    v := p view.
    v isVirtual: false.
    m := p model.
    m replaceFrom: 3 to: 7 with: #(11 22 33 44 55 66 77 88) startingAt: 3.

The display (on Win2K) isn't updated, and I'd have expected it would be.  I
have to do a:

    v refreshContents.

to get it to update.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: ListView bug ?

Blair McGlashan
"Chris Uppal" <[hidden email]> wrote in message
news:3e00b681$0$12120$[hidden email]...
> I'm not certain, but I think the following's a bug in non-virtual
ListView.

>
>     p := ListPresenter
>                 show: 'Enhanced list view'
>                 on: (ListModel on: #(1 2 3 4 5 6 7 8 )).
>     v := p view.
>     v isVirtual: false.
>     m := p model.
>     m replaceFrom: 3 to: 7 with: #(11 22 33 44 55 66 77 88) startingAt: 3.
>
> The display (on Win2K) isn't updated, and I'd have expected it would be.
...

Yup, its certainly a bug. In fact the updating of items in the model doesn't
work at all when in non-virtual mode, because the list is populated without
using "callbacks", and hence the update event handler which simply asks the
list to redraw the item in question will have no effect since there will be
no callbacks to pick up the new model value.

Thanks for the report, recorded as #1117.

Regards

Blair