# Setting Delphi compiler option "Record field alignment" does not work

**URL:** <https://www.finalbuilder.com/forums/t/setting-delphi-compiler-option-record-field-alignment-does-not-work/2677>\
**Category:** Bugs\
**Created:** [September 22, 2006, 12:07pm UTC](https://www.finalbuilder.com/forums/t/setting-delphi-compiler-option-record-field-alignment-does-not-work/2677 "2006-09-22T12:07:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 22, 2006, 12:07pm UTC](https://www.finalbuilder.com/forums/t/setting-delphi-compiler-option-record-field-alignment-does-not-work/2677/1 "2006-09-22T12:07:05Z")

</div>

Hi,

 

I do not know why, but FinalBuilder does not use correctly the value in selected .dpr Delphi-project file. It sets sometimes default value "8" when it should use the value in project file - value is "1".

 

Is it possible to set Delphi6 compiler option "Record field alignment" anyhow by using script.

 
I find only command "Action.AlignFields" which is boolean -type.

 

-JP

---

<div class="post-metadata">

**Author:** ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)\
**Post date:** [September 25, 2006, 2:53am UTC](https://www.finalbuilder.com/forums/t/setting-delphi-compiler-option-record-field-alignment-does-not-work/2677/2 "2006-09-25T02:53:35Z")

</div>

Hi JP,  
  
Have you modified the record field alignment in the Compiler tab of the action?  
  
If you want to set the record field alignment from script, you have to go via the CompilerOpt object, eg.  
  
Action.CompilerOpt.RecordFieldAlign = fa2  
  
where valid values of RecordFileAlign are:  
fa1  
fa2  
fa4  
fa8  
  
hth.  
.t8

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 26, 2006, 5:30am UTC](https://www.finalbuilder.com/forums/t/setting-delphi-compiler-option-record-field-alignment-does-not-work/2677/3 "2006-09-26T05:30:35Z")

</div>

Hi Tate,  
  
\> Have you modified the record field alignment in the Compiler tab of the action?  
  
Yes, but it loads it incorrectly when I click that (Load settings from Project file) -button. It sets it to \<8\>.  
  
\> If you want to set the record field alignment from script, you have to go via the CompilerOpt object, eg.  
  
Ok. I did not find this from FinalBuilder help.  
  
I will try it - thx!

---

<div class="post-metadata">

**Author:** ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)\
**Post date:** [September 27, 2006, 2:28am UTC](https://www.finalbuilder.com/forums/t/setting-delphi-compiler-option-record-field-alignment-does-not-work/2677/4 "2006-09-27T02:28:27Z")

</div>

> > Have you modified the record field alignment in the Compiler tab of the action?  
> > \>  
> > \>Yes, but it loads it incorrectly when I click that (Load settings from Project file) -button. It sets it to \<8\>.  
> >   
> > ic. Have a look in your .dof file for the A key in the [Compiler] section, it should be at the top of the file and look like this:  
> >   
> > [Compiler]  
> > A=1  
> >   
> > what’s the value of A in your dof file.  
> >   
> > FinalBuilder will default to 8, but should correctly read the values: 1, 2, 4 and 8  
> >   
> > .t8

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [September 27, 2006, 7:57am UTC](https://www.finalbuilder.com/forums/t/setting-delphi-compiler-option-record-field-alignment-does-not-work/2677/5 "2006-09-27T07:57:42Z")

</div>

Our .dof setting is…  
  
[Compiler]  
A=1

---

<div class="post-metadata">

**Author:** ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)\
**Post date:** [September 27, 2006, 8:13am UTC](https://www.finalbuilder.com/forums/t/setting-delphi-compiler-option-record-field-alignment-does-not-work/2677/6 "2006-09-27T08:13:47Z")

</div>

hmm, strange, that should work. can you send us your FB project and your dpr and dof file and we’ll take a look more closely, thanks. (send to support at finalbuilder dot com)
