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

Old December 30th, 2017, 02:58 PM
This is probably one of those "duh" moments, but I'm trying to set up a table with Edit fields (for names of the things) and I can't seem to get the changes made to stick. Here is the portal (other extraneous details edited out for simplicity):

Code:
<portal
  id="ftMembers"
  style="tblNormal">
    <table_fixed component="FTMember" showtemplate="FTMPick">
      <headertitle>
        @text="Fireteam Members"
      </headertitle>
    </table_fixed>
  </portal>
  
<template
  id="FTMPick"
  name="Fireteam Member Pick"
  compset="FTMember"
  marginhorz="5"
  marginvert="10">
  
  <portal
    id="name"
    style="editNormal">
    <edit
      field="ftName">
      </edit>
    </portal>
  
  <position><![CDATA[
    ~set up our height based on our tallest portal
    height = portal[name].height
    portal[name].width = 100
    
    ~if this is a "sizing" calculation, we're done
    if (issizing <> 0) then
      done
      endif

    ~position our tallest portal at the top
    portal[name].top = 0

    ~position the name on the left
    portal[name].left = 0
    ]]></position>
  </template>
The component and compset:
Code:
<component 
  id="FTMember"
  name="Fireteam Member"
  autocompset="no"
  panellink="ftPanel">
  
  <field
    id="ftName"
    name="Fireteam member name"
    type="user">
    </field>
  </component>

<!-- Fireteam -->
<compset
  id="FTMember">
  <compref component="FTMember"/>
  </compset>
The Thing entry:
Code:
<thing
  id="Fireteam"
  name="Fireteam member"
  compset="FTMember"
  isunique="no"
  description="This is a fireteam entry.">
</thing>
And where I bootstrap three of them onto the player (here, trying to set values so that I can see a difference from the outset):
Code:
<bootstrap index="30" thing="Fireteam">
  <assignval field="ftName" value="Bob"/>
</bootstrap>
<bootstrap index="31" thing="Fireteam">
  <assignval field="ftName" value="Tom"/>
</bootstrap>
<bootstrap index="32" thing="Fireteam">
  <assignval field="ftName" value="Harry"/>
</bootstrap>
The values I set don't get shown (instead, I get "0" in the field) and when I edit a field and exit the tab, it's back to "0" when I come back. And, when I look at the entry in the Debug window for Fields for the selected object, indeed, there's nothing in it.

I set this up using the template of skills having domains, which seemed parallel, and they don't seem to do anything special. What am I missing?
Duggan is offline   #1 Reply With Quote