View Single Post
Phrll
Member
 
Join Date: Dec 2014
Location: Cincinnati, OH
Posts: 57

Old September 10th, 2020, 02:48 PM
I'm working with the new system skeleton files and having a problem with a new component. I'm not getting any compile errors and everything loads but nothing is being displayed in the portal on the Basics tab. I can replace the compset in the portal and template with one of the "built-in" ones (Attribute, Skill, etc.) and everything works so I'm 99% sure the problem is with the component, I just don't know what I'm doing wrong. I tried autocompset="yes" initially but tried a separate <compset> section as well, with the same results. I'm pretty new to this so it's probably something dumb.

Here are the component and compset definitions, they're in traits.str.

Code:
 <component
    id="Condition"
    name="Condition"
    autocompset="no">
    <!-- Activation state of ability - we're not activated by default -->
    <field
      id="condActive"
      name="Is Activated?"
      type="user"
      minvalue="0"
      maxvalue="1">
      </field>
    </component>

  <compset
     id="Condition">
     <compref component="Condition"/>
     </compset>
The thing_conditions.dat file:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<document signature="Hero Lab Data">
  <thing id="condUpset"
    name="Upset"
    compset="Condition"
    description="Description goes here"
    isunique="yes">
    <fieldval field="condActive" value="0"/>
    <tag group="explicit" tag="1"/>
    </thing>
</document>
The Portal. This and the template code are in tab_basics.dat.
Code:
  <portal
    id="baCondition"
    style="tblInvis">
    <table_fixed
      component="Condition"
      showtemplate="baCondPick"
      showsortset="explicit"
      scrollable="no">
      <headertitle><![CDATA[
        @text = "Condition"
        ]]></headertitle>
      </table_fixed>
    </portal>
And the Template.
Code:
<template
    id="baCondPick"
    name="Condition Pick"
    compset="Condition"
    marginhorz="16"
    marginvert="3">

    <portal
      id="name"
      style="lblLeft"
      showinvalid="yes">
      <label
         field="name">
         </label>
      </portal>
      
    <portal
      id="info"
      style="actInfo">
      <action
        action="info">
        </action>
      </portal>

    <position><![CDATA[
      height = portal[info].height

      ~if this is a "sizing" calculation, we're done
      doneif (issizing <> 0)

      portal[info].top = 0

      perform portal[name].centervert
      perform portal[info].alignedge[right,0]

      portal[name].left = 0
      portal[name].width = 135
      debug "top = " & portal[name].top & " height = " & portal[name].height

      ]]></position>

    </template>
Phrll is offline   #1 Reply With Quote