Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   Gizmo confusion (http://forums.wolflair.com/showthread.php?t=43348)

TCArknight April 1st, 2013 05:18 PM

Gizmo confusion
 
2 Attachment(s)
Ok, I'm trying to work with gizmos for the skills in the Doctor Who system.

I've got the form to pop up but it's very odd. :( (frmAoE)
The Skills tab is as I expect it,with clicking on the edit buttonopening the frmAoE. On the form, I'm not sure why the '????' instead of the "Add Specialty"

(I've attached the system code on the next post)

Any thoughts?

TCArknight April 1st, 2013 05:19 PM

1 Attachment(s)
Instead of posting the code, I attached the latest files so you can see what's going on. :(

Mathias April 2nd, 2013 07:23 AM

The data files could not be loaded due to the following errors:
File: tab_traits.dat (line 49) - Portal - Duplicate record encountered ('abGood')
File: tab_traits.dat (line 84) - Portal - Duplicate record encountered ('abBad')
File: tab_traits.dat (line 118) - Template - Duplicate record encountered ('abSelect')
File: tab_traits.dat (line 192) - Template - Duplicate record encountered ('abPick')
File: tab_traits.dat (line 313) - Layout - Duplicate record encountered ('abilities')
File: tab_traits.dat (line 344) - Tab Panel - Duplicate record encountered ('abilities')

Mathias April 2nd, 2013 07:26 AM

Sorry, cancel that error message - I needed to delete your last posting of the doctor who files before adding in the new set. I'm guessing you renamed one of your tab files, so when simply adding one set to the other, I end up with both the old and new copies of that tab's file, so I get duplicates.

TCArknight April 2nd, 2013 07:28 AM

Arrrrrgh! I swear it didn't do that to me when I reloaded it right before I zipped it up :(

I'll have to redo it tonight after work :(

Mathias April 2nd, 2013 07:28 AM

Please take another look at the files you've posted. On the skills tab, every item there is named "testing", which doesn't match your screenshot, and none of them have edit buttons.

Mathias April 2nd, 2013 07:57 AM

Note how all my gizmo examples had a helper pick?

That's because of a change that needs to be made to tables within a gizmo.

normally, you can leave the addpick="" part of a table_dynamic blank, because it defaults to addpick="actor". But in a gizmo, there is no default available, so you must have an addpick="". So, I always add a helper pick, and set the addpick="" to that helper pick.

Without an addpick, the additem text will always be ??????

The helper pick doesn't need to be complex - you can use the Simple compset that's defined in miscellaneous.str for that pick, because it doesn't need to have any behaviors of its own - it just needs to be present.

TCArknight April 2nd, 2013 05:32 PM

Mathias,

Thanks for the help. :)

I looked into the 4e files and saw what you mean about the helper.

http://i15.photobucket.com/albums/a3...ps785fd1c8.jpg
I've got this Skill Tab working to this point. The edit button is visible, and the mouseover text reads "Add Expertise" as I expect.

When I click on the edit button, I get this as frmAoE.
http://i15.photobucket.com/albums/a3...ps01b01ea6.jpg

If I go ahead and click on the ????? to add an item, I get this chooser:
http://i15.photobucket.com/albums/a3...ps37b0f1c9.jpg

But, once I make a selection, I get this but it adds it to the form.
Quote:

Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Empty candidate tagexpr specified for field 'aoeAoEExpr' on pick 'AoEHelp'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
Here's the definitions:
Code:

  <entity
    id="entAoE"
    form="frmAoE">
    <bootstrap thing="AoEHelp"/>
    </entity>

  <!-- AoE Helper component
        Each AoE Gizmo derives from this component
  -->
 
  <component
    id="AoEHelp"
    name="Area of Expertise Helper">

    <!-- Selection Tag Expressions -->
    <field
      id="aoeAoEExpr"
      name="Equipment Tag Expression"
      type="derived"
      maxlength="500">
      </field>

    </component>

<document signature="Hero Lab Data">

  <portal
    id="prtAoE"
    style="tblNormal">
    <table_dynamic
      component="SkillAoE"
      showtemplate="tmpAoE"
      choosetemplate="tmpAoE"
      scrollable="yes"
      alwaysupdate="yes"
      candidatepick="AoEHelp"
      candidatefield="aoeAoEExpr">
      <additem><![CDATA[
        @text = "Add Expertise"
        ]]>
        </additem>
      </table_dynamic>     
    </portal>

  <template
    id="tmpAoE"
    name="Area of Expertise Pick"
    compset="SkillAoE"
    marginhorz="3"
    marginvert="1">

    <portal
      id="name"
      style="lblSmall">
      <label>
        <labeltext><![CDATA[
          @text = field[name].text
          ]]></labeltext>
        </label>
      </portal>
   
    <portal
      id="delete"
      style="actDelete"
      tiptext="Click to delete this item">
      <action
        action="delete">
        </action>
      </portal>

    <position><![CDATA[
   
      ~set up our height based on our tallest portal
      height = portal[name].height

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

      ~position our tallest portal at the top
      portal[name].top = 0
      portal[name].left = 0
     
      ~center the other portals vertically
      perform portal[delete].centervert

      ~position the delete portal on the far right
      perform portal[delete].alignedge[right,0]
      portal[name].width = width - portal[delete].width

      ]]></position>
    </template>

  <layout
    id="layAoE"
    marginvert="4">
    <portalref portal="prtAoE" taborder="20"/>
    <position><![CDATA[

      ~position and size the table to span the full layout
      portal[prtAoE].left = 0
      portal[prtAoE].width = width
     
      ]]></position>
    </layout>

  <form
        id="frmAoE"
        name="Area of Expertise"
        marginhorz="10"
        marginvert="5">
        <layoutref layout="layAoE"/>
        <position><![CDATA[
          layout[layAoE].width = 250
          perform layout[layAoE].render
          width = layout[layAoE].width
          height = 200
          ]]></position>
        </form>

  </document>

I still seem to be missing something. Is it something with the choosetemplate or candidatepick?

Also, how to I forward the SkillGen.xxxx tag into the aoeAoEExpr field for use as the candidate expression?

TC

Mathias April 3rd, 2013 08:39 AM

prtAoE needs an addpick="", set to your helper item.

Kairos April 3rd, 2013 08:49 AM

For what it's worth, I find this thread immensely helpful.:)


All times are GMT -8. The time now is 12:10 PM.

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