Hi All,

I have seen shorty findout the solution  reload the viewstack
component data...

Same way i m using the code like this...

    if(event.newIndex==1){
                    /* var test1Obj:test1 = new test1();
                    getDocumentChildrens(test1Obj,"test1");
                    Alert.show("execute"); */

                    var obj:test1 = VS1.getChildByName("test1") as
test1;
                    obj.reload();
                }
for me i got build error like..
1061: Call to a possibly undefined method reload through a reference
with static type test1.

Please let me know what i did wrong in that
Thanks for any urgent help...

Regards,
Pradeep

On Feb 5, 4:11 pm, Fausto Vaz <faustovaz.gru...@gmail.com> wrote:
> Hi shorty,
>
> i had the same problem few days ago. I got this done by adding some
> functionality in change event of the viewstack.
> Try to do the folowing:
> Instead of getting the object using getChildAt, try to get the object by its
> name and then call some method that do the refresh for you, like this:
>
>         private function stackHandle(event:IndexChangedEvent):void
>         {
>            var obj : verPrendas = viewstack1.getChildByName("verPrendas");
>            obj.reload();
>         }
>
> Note that you have to implement the method reload wich can be a function
> that retrieve a list ou do some tasks to refresh its data.
>
> Best Regards,
>
> Fausto.
> 2010/2/5 shorty <shorty.a...@gmail.com>> Hi guys, im new in this group, im 
> from chile, then i speak spanish
> > native, my english is not good.
>
> > Well, my question: i have a viewStack and with two contents, one for
> > add items and other for show items in a datagrid, then when i add a
> > item and i change contents for see new items, my datagrid it's same
> > don't refresh or reload data, then i read that i can make a function
> > for each time that i change of container, this function reload data.
> > but doesn't work.
>
> > Below  i let u my code from my viewstack:
>
> > <mx:ViewStack creationPolicy="all" selectedIndex="0"
> > change="stackHandle(event)" x="21.5" y="10" id="viewstack1"
> > width="716.5" height="518">
> >                  <com:verPrendas id="verPrendas" label="Mi Ropa"
> >                                  height="518" width="714"/>
>
> >                  <com:crearPrendas id="agregarPrenda"
> > label="Agregar"
> >                                  height="518" width="714"/>
>
> > </mx:ViewStack>
>
> > and here my function that assume it will reload my data.
>
> >         private function stackHandle(event:IndexChangedEvent):void{
>
> >            var obj:Object = viewstack1.getChildAt(event.newIndex);
> >            obj.reload();
> >         }
>
> > I need u help, other function or any other idea. i saw a theme similar
> > in this group, but i can't understand.
>
> > Sorry for my english
>
> > greetings
>
> > i will be waiting
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Flex India Community" group.
> > To post to this group, send email to flex_in...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > flex_india+unsubscr...@googlegroups.com<flex_india%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/flex_india?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_in...@googlegroups.com.
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to