Announcement

Collapse
No announcement yet.

scaleform dataprovider issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    This code will return the complete dataProvider array:

    Code:
    local array<string> Pieces;
    local int i;
    
    GetVariableStringArray("_root.theList.dataProvider", 0, Pieces);
    for(i=0;i<Pieces.Length;i++)
    	`log("["$i$"]"@Pieces[i]);

    Leave a comment:


  • started a topic scaleform dataprovider issue

    scaleform dataprovider issue

    Hi guys, i got a bit of an issue trying to figure out how to read an array value into uscript.

    heres the setup.

    1 flash movie, with a dropdown menu on it populated using dm2.dataProvider = ["blah","blah blah"];

    now in actionscript i can do this

    trace(dm2.dataProvider);

    and this

    trace(dm2.dataProvider[0]);

    The first instance returns [DataProvider (2)] .
    the second returns blah.

    So i plug this into uscript.

    i have a GFXObject theList that is hooked up properly.
    next i do

    local string mystring;
    mystring= theList.GetString("dataProvider");

    and it works great i get back [DataProvider (2)] .

    my problem happens when i try to do

    local string mystring;
    mystring= theList.GetString("dataProvider[0]");

    my string array returns nothing. So i figure its not returning a string or im asking for the value in the wrong way.

    so i next try

    local GFxObject mystring;
    mystring= theList.GetObject("dataProvider[0]");

    and it returns None.

    Does anyone know what i am doing wrong?? is it the way i wrote the code??

    Thanks guys.
Working...
X