View Single Post
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old November 19th, 2019, 01:54 AM
Minor follow-up, that's exactly what I needed to do, was to move it into an eval and do it earlier.

Code:
<!-- SkillBonus component -->
<component
  id="SkillBonus"
  name="Starting Skill Bonus"
  autocompset="no"
  panellink="basics">
  
  <field
    id="skbNamCst"
    name="Custom Name"
    type="user"
    maxlength="20"/>
    
  <field
    id="skbName"
    name="Name"
    type="derived"
    maxlength="20">
    </field>
  
  <eval index="1" phase="Initialize" priority="3005"><![CDATA[
    if (this.field[skbNamCst].isempty = 0) then
      field[skbName].text = field[skbNamCst].text
    elseif (this.isroot <> 0) then
      field[skbName].text = this.root.field[name].text
    else
      field[skbName].text = this.field[name].text
    endif
    ]]></eval>
  </component>

Last edited by Duggan; December 22nd, 2019 at 05:08 PM.
Duggan is offline   #8 Reply With Quote