FG Spreadshirt Swag
Page 1 of 2 12 Last
  1. #1

    Specify subwindow datasource

    Hi all

    For a subwindow, the FG Manual indicates:
    The created window will always have the same data source as the parent window.

    Is it possible to specify a specific datanode ?

    Thank's.

  2. #2
    The subwindow control now supports a setValue(class, recordpath) API that you can use to load alternate data paths in Lua script.

    Regards,
    JPG

  3. #3
    Thank's for your response.
    Whats is thé exact syntax ?
    Is there an entry in the wiki ?

  4. #4
    Sorry but have you an example ?

    Thank's

  5. #5
    From the CoreRPG ruleset, it's used to set values into the background image panel.
    [CORE]
    wPanel.sub.setValue("imagepanelwindow", sRecord);
    [/CORE]

    The values accepted are just like any link within FG. It requires a valid window class name, and a data path.

    Regards,
    JPG

  6. #6
    Thank's, I will try this today.

    Nicolas

  7. #7

    Join Date
    Jul 2010
    Location
    Germany, Frankfurt
    Posts
    156
    Quote Originally Posted by Moon Wizard View Post
    From the CoreRPG ruleset, it's used to set values into the background image panel.
    [CORE]
    wPanel.sub.setValue("imagepanelwindow", sRecord);
    [/CORE]

    The values accepted are just like any link within FG. It requires a valid window class name, and a data path.

    Regards,
    JPG
    I tried to set a subwindow source path with the "Ruleset Wizard" tool (see post in the Armor/Paid Creation/Ruleset Wizard thread) . The wizard create a subwindow tag with as "source" attribute where it stores the path i set in the tool. But this seams to be not working.
    Is the definition of a source as attribute in the subwindow tag currently not supported ?

    So i tried the set source path of the subwindow as you described (in "onInit" of the subwindow control). This work , but has the effect that for the numberfields i have defined in my window class, which i use for the subwindow, nodes were created on root level of the main window and on the source i have defined with setValue.
    I think the reason for that is, that the field control in the sub window class were inititialized before the "onInit" of the subwindow control. The "onInit" of the subwindow control then seams to trigger again a "onInit" of the numberfield control of its window class, is that right ?

    If yes, how i could prevent that?

  8. #8
    You can not set a "source" attribute on a subwindow. It doesn't do anything. That's only valid for value type fields (string, number, link, formattedtext, etc.)

    Subwindows use the same data source path as the containing record; unless specifically set otherwise using the setValue API.

    Regards,
    JPG

  9. #9

    Join Date
    Jul 2010
    Location
    Germany, Frankfurt
    Posts
    156
    Thanks for clarify that.

    Have you an idea how i could change the data source path of a subwindow with setValue before the value type fields which are contained in that subwindow will be initialized ? Otherwise the value nodes of that fields will be created in the containing record of the subwindow and not at then "new" path of the subwindow.

    I have set fastinit for my subwindow, is this maybe my fault ? Or do i have to change somehow the onInit of the value field control or the window class containing to the subwindow ?

  10. #10
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Arent you just trying to store attribute info in the character sheet?
    This will be done without you adding a source on the subwindow as someone pointed out in the other thread.

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