Keep in mind that attempting to implement keeps this way is essentially a
stopgap measure. It is quite unlikely that the code will be useable for all
situations and will most likely be replaced.
As you outlined below there are a number of issues that make the current
implementation complicated and will eventually lead to complex
unmaintainable code.
As far as the project is concerned it would be better to implement these
things properly with a good plan on how to approach it from scratch.
On the other hand it may be useful to have some small part implement for
your needs and give you a chance to know how the code works.
On Thu, 30 Aug 2001 19:46:21 Don Wellington wrote:
> I was looking at rollback, and it didn't seem to undo
> layouts. Instead I set up a Vector in FOnode to
> contain a list of areas that a node creates, then
> filled in FONode.removeAreas() to remove the areas
> using that list. Then, I changed block to add the
> area it creates to that list. Then, set the marker to
> a value that will cause areas to be recreated, but not
> do anything to IDs (couldn't figure out how to back
> out ID's so didn't worry about it). The algorithm I
> see for keep-with-next:
>
> A node layout returns keep-with-next
> Set flag active for keep-with-next(page or column)
> Attempt to layout next node
> If next node layout returns AREA_FULL_NONE
> determine if full area is a page or a column
> If full area match with-(page/column)
> remove areas created by previous node
> set marker to prior to layout of previous node (I
> think I have remove doing this.)
> Return AREA_FULL_SOME
>
> Seems fairly simple. Here are the gotchas.
> 1) Preventing infinite loops. If you have both areas
> combined overflow the column of page, then it is
> impossible to keep-with-next.
> 2) I think a marker needs to be enumerated for setup
> done no area created. Say AREAS_READY_TO_BE_CREATED =
> -42, or possibly 0, since block uses the marker to
> designate which subnodes have been created so far.
> Basically, I think the use of marker needs to be
> fomalized somewhat.
> 3) Does undoing areas cause problems with the ID code?
> If so, how do we undo IDs too?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]