Ticket #131 (new enhancement)

Opened 1 year ago

Last modified 1 year ago

Add "Offset" and "Length" types

Reported by: nneonneo Assigned to: haypo
Priority: normal Milestone:
Component: core Keywords:
Cc:

Description

Possible idea: add Offset8, Offset16, Offset32, Offset64 types and similar types for Length.

These would help greatly in files using offsets and lengths, because it would permit a smart editor to relink offsets and lengths when the relevant sections are modified.

Declaring a Length should also (ideally) make the current field set that length (or, of course, it could always be manually done by self.max_length=selflength?).

Offsets should be declared with the start-point as an init param, kind of like parent (e.g. field[set] which is considered the beginning for the offset). Same probably goes for length...

Just an idea. nneonneo [Robert Xiao]

Attachments

Change History

06/25/07 12:46:50 changed by haypo

A more generic idea is to subscribe events and call functions before/after changing a field value:

  • check value before field value change
  • update other field after changing field value (eg. recompute CRC32, update chunk length field, etc.)

This work should be done in hachoir-editor.


Add/Change #131 (Add "Offset" and "Length" types)