Hello Johan, I've coded all the examples manually, changing the names to avoid any conflict with the ProtocolBrowser "bundled" in the Pharo 5 image (i.e. instead of "ProtocolBrowser" I've named my class as "ProtcolFlipper"). But the result is the same. Things improve if all the "ifNil: [ text text: '' ]" get removed from the ProtcolFlipper>>initializePresenter method. Obviously the text pane is no more "cleaned" when deselecting an "api" or "api-event" row. I've tried to substitute the "ifNil: [ text text: '' ]" with "ifNil: [ text text: 'api' ] and ifNil: [ text text: 'api-events' ] , respectively on the "api" and "event" instances, in the ProtocolBrowser >> initializePresenter method. In this way I found that "ifNil:" message is sent improperly, i.e. when a "api-event" row is selected then the message "ifNil:" of the "api" instance is triggered, and vice-versa. In some way this is correct: when a "api-event" row is selected then none of the "api" rows are selected... However I'm puzzled by the fact that the behavior seems random: creating 3 instances I can get 3 different behaviors. have you never experienced this? Maybe I'll check again my code... thanks, Matteo On 08/09/16 00:09, Johan Fabry wrote:
Hello Matteo,
are you using the ProtocolBrowser class that comes default with Pharo 5? (In the Spec-Examples package). This is different from what is in the booklet, the code in Pharo 5 is not up to date. For now, you should define a new protocol browser class (MyProtocolBrowser for example) and the other classes that are in that section. Sorry for that...
-- Does this mail seem too brief? Sorry for that, I donât mean to be rude! Please see http://emailcharter.org .
Johan Fabry - http://pleiad.cl/~jfabry <http://pleiad.cl/%7Ejfabry> PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
On Sep 7, 2016, at 18:57, Matteo via Pharo-users <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>> wrote:
*From: *Matteo <matteob8@yahoo.it <mailto:matteob8@yahoo.it>> *Subject: **SpecBooklet: Strange behavior of ProtocolBrowser* *Date: *September 7, 2016 at 18:56:08 GMT-3 *To: *pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>
Hi, I'm playing with the ProtocolBrowser class, as coded in the "SpecBooklet.pdf" document (release of the 3rd August 2016). I'm using Pharo 5.
I'm experiencing a strange behavior of the ProtocolBrowser instance: -if I open a ProtocolBrowser instance, and I click on a "api" item, I do not get any code in the text pane. -If I open another ProtocolBrowser instance then I do not see any code, even in the "api" protocol than the "api-events" one. -If I open a further instance then the widget works correctly, showing the "api" or "api-events" code in the text pane.
Please note that the ProtocolBrowser is instantiated as follow: (ProtocolBrowser new) openWithSpec
Could my Pharo image be faulty? Is there some problem with ProtocolBrowser>>initializePresenter?
Thanks, Matteo Bellotto