Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,166

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
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,236

Old December 30th, 2017, 07:03 PM
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.
Mathias is online now   #2 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,166

Old December 30th, 2017, 07:47 PM
Thank you. That was very useful.
Duggan is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:39 AM.


Powered by vBulletin® - Copyright ©2000 - 2018, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.