I hadn't picked up the validateNow() tip yet; thanks for providing a more complete answer!
Thomas, Erik wrote:
There are a couple stategies that may work in different circumstances. For example, calling executeBindings(true) will force all bound data to requery their sources which essentially updates your view if it's a form and/or if it's the data you really want to refresh. However, if you just want the entire layout to repaint without regard to refreshing data bindings, the sure fire way is this: invalidateDisplayList();
validateNow();
The first call to invalidate the display list *might* result in the view refreshing, but it only marks the view as needing a refresh and doesn't always immediately do so. By calling validateNow() after invalidating your display list, you are "forcing" the UI to repaint immediately. I think that's probably what you meant when you said you wanted to "force" a refresh. You can see this pattern used all over the Flex SDK. Erik

------------------------------------------------------------------------
*From:* [email protected] [mailto:[email protected]] *On Behalf Of *Jeffry Houser
*Sent:* Monday, February 02, 2009 3:36 PM
*To:* [email protected]
*Subject:* Re: [flexcoders] RERENDER - Is there a way to force a canvas to re-render/refresh?


invalidateDisplayList();

sailorsea21 wrote:
> Hi everyone, is there a way to force a canvas to rerender/refresh?
>
> Thanks.
>
> David
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> > Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 <https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847> > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo <http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo>! Groups Links
>
>
>
>
>

--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h <http://tinyurl.com/684b5h> http://www.twitter.com/reboog711 <http://www.twitter.com/reboog711> | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com.com?c=104 <http://www.flextras.com.com?c=104>
--
http://www.theflexshow.com <http://www.theflexshow.com>
http://www.jeffryhouser.com <http://www.jeffryhouser.com>
--
Part of the DotComIt Brain Trust


--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust

Reply via email to