[Seaside] registerObjectForBacktracking

Philippe Marschall philippe.marschall at gmail.com
Thu Mar 8 20:40:50 UTC 2007


2007/3/8, Norbert Hartl <norbert at hartl.name>:
> Hi,
>
> I know this is a subject that comes along on a regular
> base :) But in all pages I found I cannot say that I
> understand it completely. I want to know what is this
> call exactly for.

It reverts the state of the object when you hit the back button.

> If I have a component which consists of sub-components
> I have to take care what is returned by the children
> call.

Returning too much (e.g components that are not rendered) is in
general not a problem.

> I know it works without but it causes problems.
> I don't know exactly when the problem arises.
> Same is with sub-components which are stored in an
> ivar and which get exchanged according to the state
> of the component.

This is the most important use of #registerObjectForBacktracking:

> So when do I have to use registerObjectForBacktracking?

If you have state that needs to be backtracked ;)

> - If I use sub-components in an ivar and want to be sure
>   the back button is working properly?

Only If the contents of the ivars are changing over time.

> - Any other cases?

If you have any state that needs to be backtracked when the user hits
the back button. E.g. currently selected index of a batched list.

> - Are the children call and the registerObjectForBacktracking
>   somehow exchangeable?

No

Philippe

> thanks in advance,
>
> Norbert
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the Seaside mailing list