Login  Register

Re: "whenSelectedItemChanged:" in Spec

Posted by Peter Kenny on Jul 16, 2019; 4:30pm
URL: https://forum.world.st/whenSelectedItemChanged-in-Spec-tp5101233p5101247.html

Steve

How did you get the source code for the examples? Pages 12-13 of the "Spec UI Framework" booklet give the code for the methods of class WidgetClassList, and there we find:

WidgetClassList >> whenSelectedItemChanged: aBlock
        list whenSelectedItemChanged: aBlock

This looks very much like the 'when....' methods of all the other subclasses of ComposablePresenter. It should at least do something when activated.

HTH

Peter Kenny

-----Original Message-----
From: Pharo-users <[hidden email]> On Behalf Of Ben Coman
Sent: 16 July 2019 15:42
To: Any question about pharo is welcome <[hidden email]>
Subject: Re: [Pharo-users] "whenSelectedItemChanged:" in Spec

On Tue, 16 Jul 2019 at 12:49, Steve Quezadas <[hidden email]> wrote:
>
> I am running through the "Spec UI Framework" tutorial, and in it has a widget class inherited from "ComposablePresenter" (ComposablePresenter subclass: #WidgetClassList). But for some reason the "whenSelectedItemChanged:" method call does not execute when I select any item on the GUI list. Is there anything I'm missing?
>
> I posted this earlier on the list, and someone suggested I try  "whenActivatedDo:" or "whenSelectionChangedDo:", but it doesn't do anything as well. The code looks like this:
>
> whenSelectedItemChanged: aBlock
>     Transcript show: 'should get here; cr.
>
> I am using Pharo 7.

Can you FileOut the entire sample class and attached it?

cheers -ben