Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top