[Seaside] Re: Menu component - communicating with root component

Boris Popov boris at deepcovelabs.com
Sun Apr 20 21:16:08 UTC 2008

Still, we've build what I consider to be a relatively large and complex
application and I don't recall ever thinking that it was getting out of
control. Certainly not to the point of introducing more elements just to
glue announcers and subscribers together. Let's try a more complex
example to see if perhaps I am missing something. Say you have a table
containing rows containing cells and cells announce CellClicked when you
click on them. If, for some reason, you were interested to know about
that happening up in the table, how about something like,

Table>>addRow: row
 rows add: row.
  when: CellClicked
  do: [:ann | self title: ('editing row <1p> cell <2p>'
                                expandMacrosWith: ann row index
                                with: ann cell index)]

Row>>addCell: cell
 cells add: cell.
  when: CellClicked
  do: [:ann | self announce: (CellClicked row: self cell: ann cell)].

Cell>>renderContentOn: html
 html anchor
  callback: [self announce: (CellClicked cell: self)];
  with: self contents.

You could of course even have a different announcement for each phase,
this is just an example.


-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Holger
Sent: Sunday, April 20, 2008 1:44 PM
To: Seaside - general discussion
Subject: Re: [Seaside] Re: Menu component - communicating with root

Boris Popov schrieb:
> I'm not convinced that adding a third-party negotiator is easier than,
> Menu>>addItem: item
>  self items add: item.
>  item when: Clicked do: [self select: item].
> MenuItem>>renderContentOn: html
>  html anchor
>   callback: [self announce: Clicked];
>   with: self label.
true. if the triggering component is a direct child of the interested 
component, there's no need for fancy mechanisms.
but as soon as there are intermediate components, this soon gets out of 
seaside mailing list
seaside at lists.squeakfoundation.org

More information about the seaside mailing list