Folks,

How is the neophyte to be warned that DO IT will be fine, but INSPECT IT will be nasty ?

I see nothing to suggest to the user of that bit of HELP to be wary of using that code in a workspace ...

What puzzles me is that I was using CTRK-C then CTRL-D ( habit ? ) ... but I also had installed Prof Stef ... and had made the HelpBrowser UNCLOSABLE and SecondFromTop ... it failed pronto when I came to Pharo on this Win7 after it failed in Precise Puppy Linux 4.5 ��( the linux netbook is with Japanese books on a big work table outside this little office but I recall steps as Start, load Prof Stef, walk thru some Stef steps; open Sys Browser, go to Announcements, open HelpBrowser )

error handling fails BUT ��recovery is about 3 steps (CR, exit, abort debugger ) so that much is Very good ...

friend among friendly folks,

R
Canada





On 19 March 2013 12:07, Sven Van Caekenberghe <sven@stfx.eu> wrote:
Hi Robert,

The following two work for me in Pharo 2.0

World announcer
�� �� �� �� �� �� �� �� on: WindowOpened
�� �� �� �� �� �� �� �� send: #value
�� �� �� �� �� �� �� �� to: [ Transcript show: 'A new window was opened'; cr ].

World announcer
�� �� �� �� �� �� �� �� on: WindowOpened
�� �� �� �� �� �� �� �� send: #value:
�� �� �� �� �� �� �� �� to: [ :announcement |
�� �� �� �� �� �� �� �� �� �� �� �� Transcript show: 'A new window was opened ', announcement printString; cr ].

Note the #value and #value: selectors, matching the zero and one argument blocks.

I would guess that opening the Inspector inside the block creates an infinite loop ;-)

Sven

On 19 Mar 2013, at 15:47, Robert Shiplett <grshiplett@gmail.com> wrote:

> Pharo 2.0
> HelpBrowser Announcements STEP 3
>
> QUOTE:
>
> In Pharo there is a global called "World" pointing to the desktop morph. This world also has an announcer we can use to demonstrate the features of the framework:
>
> �� �� �� | announcer |
> �� �� �� World announcer
> �� �� �� �� �� �� �� on: WindowOpened
> �� �� �� �� �� �� �� send: #value
> �� �� �� �� �� �� �� to: [ Transcript show: 'A new window was opened';cr].
>
> So anytime a window is opened in the system a message is shown in the transcript:
>
> �� �� �� Transcript open.
>
> �� �� �� | announcer |
> �� �� �� World announcer
> �� �� �� �� �� �� �� on: WindowOpened
> �� �� �� �� �� �� �� send: #value
> �� �� �� �� �� �� �� to: [:ea | ea inspect. Transcript show: 'A new window was opened';cr].
>
>