ID:158499
 
Is there any way to find this out without creating error messages? I want to know if any interface controls by the specified name exist or not.
Foomer wrote:
Is there any way to find this out without creating error messages? I want to know if any interface controls by the specified name exist or not.

Maybe this could help.

http://www.byond.com/developer/Tiberath/InterfaceControl
In response to Haywire
Haywire wrote:
Foomer wrote:
Is there any way to find this out without creating error messages? I want to know if any interface controls by the specified name exist or not.

Maybe this could help.

http://www.byond.com/developer/Tiberath/InterfaceControl

Well, for one it won't let me download it and take a look, and two it has winfind(), but it says it only works for windows and panes.
In response to Foomer
Sorry.

Maybe this could help.
No, unfortunately. I had split a feature request off a similar topic Keeth made, about 3 months ago. It would be very helpful for libraries.
if(winget(src, "[specifiedname]", "pos"))
In response to Garthor
That would work but not "without creating error messages".
In response to Stephen001
Stephen001 wrote:
It would be very helpful for libraries.

I'll say. You can't even do basic checks to see if interface elements exist before attempting to work with them. If someone inputs the wrong stuff, you can end up with a nice long delay while the game spits out a bunch of error messages for you.
Foomer wrote:
Is there any way to find this out without creating error messages? I want to know if any interface controls by the specified name exist or not.

Not sure how much this will help, but you could try this.

    // I tried changing "is-visible" to id but it doesn't work.
// Also according to the Skin reference, you can not get the controls in a child pane.
var/paramString = winget(usr, "mainWindow.*", "is-visible")

var/list/Values = params2list(paramString)


I guess you could parse the list for the child control names and then check it with your name. Though that does seem like a lot. Sorry I couldn't be of more help Foomers.