Subject: A start at the new field implementation
From: Keith Stribley (email@example.com)
Date: Sun Mar 19 2000 - 17:55:22 CST
As promised, here are my efforts so far. As yet they are not very impressive, but hopefully it shows the idea. The example abw file shows a test field using pf_Frag_Text. This currently still uses objects as a place holder in the field table, rather than a strux replacement.
The following features seem to work:
Text wrapping in the middle of fields
refusing to allow users to type in the middle of fields
only allowing the user to delete part, rather than a whole field
The fields can be written in abi format and read back, though the old value of the field is currently junked and recalculated (arguably this should remain the case, it gives a higher chance of wrongly calculated fields being corrected).
There are several issues still to be addressed:
The old fields are still left in, only a new (and temporary) "test" field type is implemented showing the new mechanism.
Updating - at the moment updates are only called on reading in or after undo's.
Undo's on fields - these sometimes throw ASSERTS in the spell checking code (esp after applying formating - possible fields shouldn't be checked anyway, but this isn't implemented.
Currently field updates create change records - is this desirable? As a side effect it means than updates musn't be called in the middle of an undo as an infinite loop will result - it can never get back to the old state due to the updates.
Implement real fields! - create subclasses under the new fd_Field class to handle different types of field and do something useful.
I'm about to go on holiday for a couple of weeks, so I pray this doesn't cause too many problems.
(the patch was done 3 levels above the src directory)
-- Keith Stribley http://www.stribley.dabsol.co.uk/
This archive was generated by hypermail 2b25 : Sun Mar 19 2000 - 18:12:03 CST