pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

Error in Pharo 9's Spec UI Framework Demo

T
tau
Sun, Jul 25, 2021 3:52 AM

In the Spec2 examples included with Pharo9, in the example for SpListPresenter, when I try to input text in the list filter, I get an error: the debug window says: "Instance of OrderedCollection did not understand #hasElementAt:". The example works correctly in Pharo8.

Is there a workaround to make the example work?

In the Spec2 examples included with Pharo9, in the example for SpListPresenter, when I try to input text in the list filter, I get an error: the debug window says: "Instance of OrderedCollection did not understand #hasElementAt:". The example works correctly in Pharo8. Is there a workaround to make the example work?
EL
Esteban Lorenzano
Sun, Jul 25, 2021 6:28 AM

Hi Tau,

The filter that was bundled with the list components is deprecated and should not be used.
Instead, we provide another component with that functionality: SpFilteringListPresenter.

Take a loot there and its examples.
Esteban
On Jul 25 2021, at 5:52 am, tau tau@cedalion.info wrote:

In the Spec2 examples included with Pharo9, in the example for SpListPresenter, when I try to input text in the list filter, I get an error: the debug window says: "Instance of OrderedCollection did not understand #hasElementAt:". The example works correctly in Pharo8.

Is there a workaround to make the example work?

Hi Tau, The filter that was bundled with the list components is deprecated and should not be used. Instead, we provide another component with that functionality: SpFilteringListPresenter. Take a loot there and its examples. Esteban On Jul 25 2021, at 5:52 am, tau <tau@cedalion.info> wrote: > > In the Spec2 examples included with Pharo9, in the example for SpListPresenter, when I try to input text in the list filter, I get an error: the debug window says: "Instance of OrderedCollection did not understand #hasElementAt:". The example works correctly in Pharo8. > > Is there a workaround to make the example work?
T
tau
Mon, Jul 26, 2021 8:36 PM

Thank a lot for directing me toward SpFilteringListPresenter.

I think I found a bug in SpFilteringSelectableListPresenter. While using an SpFilteringSelectableListPresenter, if you press ctrl-a, every item in the list will get selected. Then, if you deselect a few items and press ctrl-a again, this time nothing happens. However, if you scroll the list, all the items are suddenly selected again.

This happens because the block that get invoked when ctrl-a is pressed doesn't refresh the presenter. When I changed that block from [ self activateAll ] to [ self activateAll. listPresenter refresh ], the bug disappeared.


De : Esteban Lorenzano estebanlm@netc.eu
Envoyé : 25 juillet 2021 02:28:51
À : Any question about pharo is welcome
Cc : pharo-users@lists.pharo.org
Objet : [Pharo-users] Re: Error in Pharo 9's Spec UI Framework Demo

Hi Tau,

The filter that was bundled with the list components is deprecated and should not be used.
Instead, we provide another component with that functionality: SpFilteringListPresenter.

Take a loot there and its examples.

Esteban

On Jul 25 2021, at 5:52 am, tau tau@cedalion.info wrote:

In the Spec2 examples included with Pharo9, in the example for SpListPresenter, when I try to input text in the list filter, I get an error: the debug window says: "Instance of OrderedCollection did not understand #hasElementAt:". The example works correctly in Pharo8.

Is there a workaround to make the example work?

Thank a lot for directing me toward SpFilteringListPresenter. I think I found a bug in SpFilteringSelectableListPresenter. While using an SpFilteringSelectableListPresenter, if you press ctrl-a, every item in the list will get selected. Then, if you deselect a few items and press ctrl-a again, this time nothing happens. However, if you scroll the list, all the items are suddenly selected again. This happens because the block that get invoked when ctrl-a is pressed doesn't refresh the presenter. When I changed that block from [ self activateAll ] to [ self activateAll. listPresenter refresh ], the bug disappeared. ________________________________ De : Esteban Lorenzano <estebanlm@netc.eu> Envoyé : 25 juillet 2021 02:28:51 À : Any question about pharo is welcome Cc : pharo-users@lists.pharo.org Objet : [Pharo-users] Re: Error in Pharo 9's Spec UI Framework Demo Hi Tau, The filter that was bundled with the list components is deprecated and should not be used. Instead, we provide another component with that functionality: SpFilteringListPresenter. Take a loot there and its examples. Esteban On Jul 25 2021, at 5:52 am, tau <tau@cedalion.info> wrote: In the Spec2 examples included with Pharo9, in the example for SpListPresenter, when I try to input text in the list filter, I get an error: the debug window says: "Instance of OrderedCollection did not understand #hasElementAt:". The example works correctly in Pharo8. Is there a workaround to make the example work?