[Bug]ControlClasses not working
Posted: 06 Aug 2014, 01:12
Hello, when working on a Manialink today (yesterday by now...), I encountered a Problem with the classes set in the class Attribute not being available when running the script. I.e. at execution time, the ControlClasses Array was empty, and the HasClass method returned false, even if the specified class was in the XML. My ManiaScript code is:
I tried it for elements in the same file, and in an included file.
My Client Version should be the latest, as there's no update request on start.
Code: Select all
declare CMlFrame search <=> (Page.GetFirstChild("Search") as CMlFrame);
foreach(control in search.Controls)
{
// This never executes, as HasClass always Returns false, and ControlClasses is empty.
if (control.HasClass("searchEntry"))
{
declare CMlEntry searchEntry <=> ((control as CMlFrame).GetFirstChild("entry") as CMlEntry);
searchEntry.Value = control.ControlId;
}
}
My Client Version should be the latest, as there's no update request on start.