Joshua Stream Pre
  1. #1

    accessing subwindow1 from subwindow2

    I have, what is probably going to make me feel dumb asking, a question about how to access 1 subwindow from another.

    so I am making a new sidebar window. In the window I have 2 subwindows: header and contents.

    In header: I have my link, name, lock
    in contents: I have some fields and a button.

    Pressing the button will create a string that I want to place somewhere.

    All this works just fine (kind of).

    My issue that I am having is I want the button to also take the name of the window and use that as well.
    using window.name.getValue(), doesn't work like it does for all my other strings that are in here (which I expected it not to). I can't figure out how to get from my container subwindow to my header subwindow to get name.

    I am probably going to feel foolish when I get the answer.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Newcastle, UK (for a bit)
    Posts
    29,078
    Something like parentcontrol.window.<name of the subwindow>.subwindow.<control name>

    You may not need to use parentcontrol, depending where your script is running.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    Thank You!

    I felt like I tried every combo I could think of.

    This is what I finally ended on:
    local sName = window.parentcontrol.window.header.subwindow.name. getValue();

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in