Could anyone please confirm this?

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

Could anyone please confirm this?

Günther Schmidt
Hi all,


... you show a list of items in a multicolumn list view,
when you edit one of the items the list won't update,
the trick is to remove the item temporarily,
edit it,
and the reinsert it,
so the list will update...

as is done in Personal Money.

Günther


Reply | Threaded
Open this post in threaded view
|

Re: Could anyone please confirm this?

Christopher J. Demers
"Günther Schmidt" <[hidden email]> wrote in message
news:[hidden email]...
> ... you show a list of items in a multicolumn list view,
> when you edit one of the items the list won't update,
> the trick is to remove the item temporarily,
> edit it,
> and the reinsert it,
> so the list will update...

I think removing and re-adding it is a bit too heavy handed.  You can just
tell the ListModel to refresh the disiplay for that item that was edited.
For example evaluate the following line by line to see what happens:
==============
col := ListModel on: #('aaa' 'bbb' 'ccc').
(lp := ListPresenter showOn: col) view topShell extent: 100@100.
"Make a change that requires a display update."
col first at: 2 put: $B.
"Now tell the ListModel to refresh the display for the item that was
changed."
col updateItem: col first.
==============
FYI: In Dolphin 6 updateItem: is deprecated in favor of refresh: .

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Could anyone please confirm this?

Chris Uppal-3
Christopher J. Demers wrote:

> FYI: In Dolphin 6 updateItem: is deprecated in favor of refresh: .

Gack!

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Could anyone please confirm this?

Christopher J. Demers
"Chris Uppal" <[hidden email]> wrote in message
news:43464003$1$38039$[hidden email]...
> Christopher J. Demers wrote:
>
>> FYI: In Dolphin 6 updateItem: is deprecated in favor of refresh: .
>
> Gack!

That was my first reaction as well. ;)  I guess I can adapt to that change.
However what has me more concerned is that ListModel<<updateAtIndex: has
_not_ been depreciated in favor of refreshAtIndex: (there is no such
method).  That seems inconsistent to me.  I wonder if this is intentional or
an oversight?

Chris