FG Spreadshirt Swag
  1. #1

    drag link onto subwindow fill out linkfield

    I have been spinning my wheels for too long so I thought I should ask.

    Background:
    I created a new container on the sidebar. Let's call it Powers; It has a link, name, some fields, description, and a link to an Item.

    When the user creates a Power they will manually drag and drop the Item link into here.

    This all works as expected.

    Current issue:
    I have a location on my character sheet in a subwindow to drop this to. I drag the link and drop it on the subwindow everything fills out (almost). The name and other values all fill out just fine.

    I have 2 slots for links (created with linkfield). The first slot is the link to the Powers and the second is the link to the attached Item. I can't for the life of me, set the value of these to be a link.

    I can (if I add <allowdrop />) manually drop the links on here. But what I want, is to drop the link in the subwindow and everything fills out (which it all does, except for these 2 links).

    Using the dragdata.getDatabaseNode() and running a forloop with getChildren(), I can see the link and the item_link, I just can't figure out how to set them.

    Any/all help greatly appreciated.

  2. #2
    One thing to remember is that links are actually called "windowreference" data types. Also, they return two string values when you use getValue, and they require two string values when you use setValue. The values are the "windowclass" and the "data path" of the link.

    Review your code that is setting the link values, and see if that helps.

    Regards,
    JPG

  3. #3
    I was setting 2 string values, but the wrong information. This helped a lot. It is working now.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in