ID:132689
 
I have been working with quite a few generated at runtime windows/panes. I believe it would be nice for control ids to be recieved during a winget; such as:

    winget(src, "windowOrPane.*", "id")


Would respond with: button1, label1, button2, button3, etc.

Though they are readonly, sometimes I need ro run through with a "for" on all buttons and move them around based on simple checks. I present to you an example of such a case:

If I were to close the chat with JohnGames, the bottom three buttons would need to be moved up, however the id of each one is dynamically generated, so without saving to a list on creation, I won't know what the names are.

I apologize if there is already another method I have not found that does this.
JohnGames wrote:
I have been working with quite a few generated at runtime windows/panes. I believe it would be nice for control ids to be recieved during a winget; such as:

>   winget(src, "windowOrPane.*", "id")
>

Would respond with: button1, label1, button2, button3, etc.

That code doesn't do it? The skin reference says:

"You can use a wildcard after a window name in winget() to retrieve info about all the controls in a window (including the window itself). winget(player, "mainwindow.*", "image") will return the image parameter (where available) for mainwindow and any controls that are a part of mainwindow."

...so I would assume using id as the third argument would return a list of control IDs contained by the parent cited.
In response to Mobius Evalon
Mobius Evalon wrote:
That code doesn't do it? The skin reference says:

"You can use a wildcard after a window name in winget() to retrieve info about all the controls in a window (including the window itself). winget(player, "mainwindow.*", "image") will return the image parameter (where available) for mainwindow and any controls that are a part of mainwindow."

...so I would assume using id as the third argument would return a list of control IDs contained by the parent cited.

You got my point, it looks like it would work, and oddly it just returns an empty string, id is even listed as a paramater in the skin reference.
In response to JohnGames
It just doesn't work for this specific 'parameter', then. Just use any other one that all controls have, such as is-disabled, pos, etc.
In response to Kaioken
Kaioken wrote:
It just doesn't work for this specific 'parameter', then. Just use any other one that all controls have, such as is-disabled, pos, etc.

I thank you for listing more workarounds other than my add to list on creation! However, I still would prefer to have this feature for ease, since list control is kinda messy when it's multiple objects with params.
In response to JohnGames
I have been working with dynamic interfaces as well recently, and I share John's lament at winget's inability to receive ids.

I have the feeling that this would be a relatively minor update?
In response to Falacy
Falacy wrote:
http://www.byond.com/members/DreamMakers/forum?id=724148

This goes to show that this has been wanted by more than just the few in this post, thanks for the link to another work around!