![]() |
Dynamic GUI names
When you create a GUI that has a dynamic name, i.e "Test_Window1_"@acct how can you call the GUI objects back as objects? For example, if you create a GuiMLTextCtrl named "MultiLine1_"@acct how can you call back the text contained in the object? Calling "MultiLine1_"@acct.text doesn't work, or at least hasn't for me, so I figure that's incorrect syntax. I've also tried calling (MultiLine1_@""@acct).text, or similar, which also appears to be incorrect syntax.
Does anyone know how this can be done? Also a second question, when a GUI is created is it indexed in any way so that I can tell which object to call back? Because if I have multiple dynamic GUIs, it might be difficult to find which GUI to call the information for without some sort of index or similar feature to find the name of the currently selected GUI. Thanks for the help =) - Knight |
If you create a dynamic GUI, you can use this:
PHP Code:
PHP Code:
|
How can you check for dynamic GUI events? I've been trying to do this for awhile but there's always some sort of syntax error. For example if you have a dynamic button you can't say
function ( "Test_" @ acct ).onAction() { Because that returns a syntax error. |
That's what catchevent() is for.
objectA.catchevent(objectBName, eventNameToCatch, newEventName); PHP Code:
The following script does the exact same as the above. PHP Code:
|
Quote:
PHP Code:
|
you want:
PHP Code:
|
Quote:
I asked Stefan why you needed "on" in the catchevent parameters and he said you don't and that it was cutting it off if it was there. |
Well, I added the 'on' and it works perfectly now. So, if Stefan said that you don't need on and that it was cutting it off if it was there...he maybe needs to rework that? Because it needs on for it to function properly, at least I can't get it to work without it there.
Anyways thanks for the help =) |
All times are GMT +2. The time now is 06:44 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.