Cool, thanks for the tips Josh!

-R

Josh McDonald wrote:

I'd put a

if (_title == value) return;

In there. You probably won't gain *much* performance but it's only one line, and it might help a lot depending on various bindings :)

Also, and I'm not 100% sure on this but depending on what you're actually doing with _title, it might be more in line with the standard flex way of doing things to just call invalidateProperties, and then in commitProperties() check for a change in _title (compare it with titleComponent.text or whatever) and simply change the property on that component instead of calling the entire updateDisplatList() method. But I've only seen 5 lines of your component, so that may be way off for your use case! :D

-J

On Wed, May 28, 2008 at 8:38 AM, robbarreca <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    --- In flexcoders@yahoogroups.com
    <mailto:flexcoders%40yahoogroups.com>, "Richard Rodseth"
    <[EMAIL PROTECTED]> wrote:
    > You'll see that you just need to change the locale chain of the
    > resource manager. You already have a binding expression which
    invokes
    > the resource manager.

    Thanks for the reply Richard. The problem I'm facing is that not *all*
    of the bindings are getting honored when I change localeChain. I
    realize the recursive display invalidation is not the way to go.

    Your email made me realize now that the it's my custom component
    MyPanel (which extends Box and adds a bold label on top) that isn't
    updating until updateDisplayList() is called. This was a deficiency in
    how this component was written as Flex Text and Label controls update
    fine. I wasn't accounting for these custom properties to be
    programatically set since they were just hardcoded before i18n.

    I changed

    public var title:String;

    to

    protected var _title:String;

    public function get title():String
    {
    return _title;
    }

    public function set title(value:String):void
    {
    _title = value;
    invalidateDisplayList();
    }

    and all is well. Thanks a lot!




--
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

Reply via email to