title: Strange [number]s in Delphi DFM files - origin and necessity?
body: <p>I need to change a large number of Delphi components defined in one package to similar ones in another package.
  Much of the grunt work can be done by replacing text (component types and properties) in the DFM files - saved as text of course.</p>
  
  <p>I have searched Stackoverflow and Google and am now adapting the Felix Colibri DFM parser from <a href="http://www.felix-colibri.com/papers/colibri_utilities/dfm_parser/dfm_parser.html">http://www.felix-colibri.com/papers/colibri_utilities/dfm_parser/dfm_parser.html</a></p>
  
  <p>I come across a 'feature' in the DFM files that the parser chokes on: [number]s after the type specifications like this:</p>
  
  <pre><code>inherited DialoogEditAgenda: TDialoogEditAgenda
    ActiveControl = PlanCalendar
    Caption = 'Agenda'
    [snip]
    inherited PanelButtons: TRzPanel
      Top = 537
      [snip]
      inherited ButtonCancel: TRzBitBtn [0]  &lt;== *here*
        Left = 852
        [snip]
      end
      object CheckBoxBeschikbaarheid: TRzCheckBox [1]  &lt;== *here*
        Left = 8
        [snip]
      end
      inherited ButtonOK: TRzBitBtn [2]  &lt;== *here*
        Left = 900
        [snip]
      end
    end
    inherited PageControl: TRzPageControl
      Left = 444
      [snip]
    end
    object PanelBeschikbaarheid: TRzSizePanel [2]  &lt;== *here*
      Left = 967
      [snip]
    end
    object PanelScheduler: TRzPanel [3]  &lt;== *here*
      Left = 23
      Top = 22
      [...]
  </code></pre>
  
  <p>Many of these DFMs are heavily inherited (I had to adapt Colibri's code for that already), but a small test app with inheritance failed to produce the [number]s in the DFM.</p>
  
  <p>My question before having to extend the parser code: does anyone know where these [number]s come from and consequently, can I maybe remove them before parsing the DFM files?</p>
  
  <p>Thanks</p>
  
  <p>Jan</p>