Hey guys, I used the validateNow() from the component's parent and didn't worked either... so I used the updateComplete handler and worked perfectly... not the best of ways, cause now I have two more properties in my class, but hey... it worked =D
Thanx to all... DaNooB --- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > I think you need to call validateNow() on the component's parent. > > - Gordon > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Daniel > Sent: Sunday, September 23, 2007 11:23 AM > To: [email protected] > Subject: [flexcoders] Re: Real size of components > > > > Hey guys... > > this.validateNow() doesn't work... the width property doesn't refresh > after that call... and the listener for the updateComplete Event > wouldn't work much for me, because i'm laying out the panels and I > need the width and height immediatly... Is there any way to get the > size immediatly? I could use the updateComplete handler, but rather > leave it as a last choice... > > Thanx a lot, > DaNooB > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" <aharui@> wrote: > > > > Use validateNow() or validateClient(). ValidateSize is for internal > use > > by the framework and calling it by itself isn't guaranteed to work. > > > > > > > > ________________________________ > > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of Arpit Mathur > > Sent: Saturday, September 22, 2007 11:49 AM > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > > Subject: Re: [flexcoders] Re: Real size of components > > > > > > > > Would this work? > > > > > > > > component.percentWidth = 50 > > > > component.percentHeight = 50 > > > > component.validateSize() > > > > trace(component.measuredWidth) > > > > > > > > I have never really used the validation thing so I am curious. Its how > I > > would imagine it would work. > > > > > > > > > > > > On 9/21/07, Gordon Smith <gosmith@ <mailto:gosmith@> > > > wrote: > > > > It sounds like you are expecting to set percentWidth and immediately > > have the width change. Flex visual components don't work like this. > > Typically when you set properties, the component enters a kind of > > "invalid" state until the LayoutManager updates it. If you wait until > > the component dispatches an updateComplete event, the width should > then > > be correct. > > > > > > > > - Gordon > > > > > > > > > > ________________________________ > > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> > <http://ups.com/> [mailto: flexcoders@ > > <mailto:flexcoders@> yahoogroups.com <http://yahoogroups.com > <http://yahoogroups.com> > ] On > > Behalf Of Sandeep Malik > > Sent: Friday, September 21, 2007 6:57 AM > > To: [EMAIL PROTECTED] ups.com <http://ups.com/> > > Subject: [flexcoders] Re: Real size of components > > > > > > > > I guess you should use getExplicitOrMeasuredWidth() and > > getExplicitOrMeasuredHeight(). > > > > Regards, > > Sandeep > > > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com> > > , "ben.clinkinbeard" > > <ben.clinkinbeard@> wrote: > > > > > > measuredWidth and measuredHeight I think. > > > > > > > > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> , "Daniel" <danielterraza@> > wrote: > > > > > > > > Hey guys... > > > > > > > > I'm setting the size of a panel through the percentWidth property, > > but > > > > when I ask for the width of the component it doesn't give me the > > real > > > > size... How can I know the real size when I set width and height > > > > through percentage? > > > > > > > > Thanx, > > > > DaNooB. > > > > > > > > > > > > > > > > > -- > > Arpit Mathur > > Lead Software Engineer, > > Comcast Interactive Media > > --------------------------------------- > > post your flex tips on > > http://flextips.corank.com <http://flextips.corank.com> > <http://flextips.corank.com <http://flextips.corank.com> > > > >

