[Seaside] repeats on home-made components

Avi Bryant seaside@lists.squeakfoundation.org
Thu, 18 Jul 2002 11:51:55 -0700 (PDT)


On Thu, 18 Jul 2002, Tim Rowledge wrote:

> I guess I'll just accept the magic for now and worry about it another
> day. I imagine it implies that the templates are checked each time a
> component is added, whereas I was seeing it a bit more static. That's
> what happens when you spend years doingVM stuff, you get so used to the
> limitations imposed by C that it's hard to accept how flexible the
> _real_ stuff is.

Erm, not exactly.  Bindings are synchronized each time a component is
displayed.  So if you have a component in a repeat loop, with a

set: #foo to: #bar,

foo will get set to (the current value of) bar each time through that
loop.  That's the point of bindings, as opposed to just initializing the
component with some value.

> It does remind of another strangeness with #addBindingsTo: though.
> Various things had made me think you were running the method in any
> class you found it up the chain from the origin class of a component.
> That seemed odd, but I've seen it done before and so didn't get too
> excited. However, I recently refactored a load of stuff and it seems
> more like you're doing nothing unusual at all, so to make use of
> bindings set up in an abstract superclass one needs to do the normal
> super send. Which hallucination is the correct one?

The latter - nothing funky going on.