• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Setting up a table of editable items

Duggan

Well-known member
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?
 
The ftName field definition does not specify a maxlength="". Therefore, that's a numerical field, and so unless the user types in a number as part of their text, that'll = 0.
 
Back
Top