No announcement yet.

AS3 TileList not getting Unreal data

  • Filter
  • Time
  • Show
Clear All
new posts

    AS3 TileList not getting Unreal data


    I am trying to get to work a CLIK TileList. First of all, every list in my menus works perfectly well.
    Difference between this list and others that work : this one is in frame 2 while others are in frame 1.

    Here is my AS code for frame 2, setting up a default dataProvider :
    // Weapon list
    if (WeaponList.dataProvider.length == 0)
    	var itemsData:Array = new Array();
    	itemsData.push({label:"DEFAULT", index:0});
    	var dp:DataProvider = new DataProvider(itemsData);
    	WeaponList.dataProvider = dp;
    Here is the method in UDK, called in WidgetInitialized():
    reliable client function UpdateWeaponList()
    	local byte i;
    	local GFxObject TempObj;
    	local GFxObject DataProvider;
    	DataProvider = WeaponListMC.GetObject("dataProvider");
    	`log("UpdateWeaponList"$DataProvider @WeaponListMC.GetFloat("rowCount"));
    	for (i = 0; i < 3; i++)
    		TempObj = CreateObject("Object");
    		TempObj.SetString("label", "TEST");
    		DataProvider.SetElementObject(i, TempObj);
    		`log("WeaponListMC obj = "@TempObj);
    	`log("WeaponListMC = "@WeaponListMC);
    	WeaponListMC.SetObject("dataProvider", DataProvider);
    	WeaponListMC.SetInt("rowCount", i);
    Nothing is showing apart from my "DEFAULT" set in AS.
    Here is the log. You can see that on UDK's side, the dataProvider looks suspicious : the count is wrong (and it looks nothing like a logical value, 7, really ?).
    [0007.88] ScriptLog: UpdateWeaponListGFxObject_64 7.0000
    [0007.88] ScriptLog: WeaponListMC obj =  GFxObject_65
    [0007.88] ScriptLog: WeaponListMC obj =  GFxObject_66
    [0007.88] ScriptLog: WeaponListMC obj =  GFxObject_67
    [0007.88] ScriptLog: WeaponListMC =  GFxClikWidget_9
    So what the hell is happening ? Why isn't my list working ?
    If I replace WeaponListMC by a reference to another list (those that work) I have no problem. But this list seems completely disconnected, without reason.

    I also tried copypasting a working list, renaming it, I get the same result.

    I have been trying everything for hours and hours and hours and I am still not getting my data. Please help, this is really getting boring...