Domanda

So my problem here is that i get all the data from the database using php services. the count service and the getAllData works just fine when using them on components but when i try to use them in functions i dont get anything. It's realy bugging me and i know that it something simple but i cant find a solution.

Working:

<s:Label id="testlabel" x="162" y="67" text="{getAllMarkersResult.lastResult[1].name}"/>

Not Working:

public function test():void
        {
            testlabel.text=getAllMarkersResult.lastResult[1].name;
        }

Any help? thanx

È stato utile?

Soluzione

Ok so the problem was that in order to use the lastresult or any other service i had to run them straight away when the view was starting and not in another function. So i created a onCreate() function initialising evarything and then called it on th xlmns: oncompletecreate:onCreate(); and everything worked like a charm.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top