I don't think I've seen anything like this before and maybe I'm just going
crazy.

I've got a class that extends TitleWindow, it has a few setters and some of
these can affect what the displayed title should be. These all use
invalidation flags and don't get fully committed until commitProperties. If
I call super.commitProperties() at the beginning of my commitProperties
function, and then change the title somewhere else in that function, the
title NEVER gets commited. I've stepped through the code and I really can't
see why. There are only two places in Panel.as that modify _titleChanged. I
see it getting flipped to true in the setter, then when commitProperties
gets around to executing, the flag is magically false?

Anyways, if I call super.commitProperties after I do all my work and
possibly modify the title, everything is fine, except it looks really whacky
because I've had it ingrained for years that you always call super class
functions at the beginning...

A subclass of TitleWindow as simple as this exhibits the behavior:

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
width="400" height="300">

    <mx:Script>
        <![CDATA[

            override protected function commitProperties():void
            {
                super.commitProperties();
                title = "ljsdflksjdflkj";
            }

        ]]>
    </mx:Script>
</mx:TitleWindow>

Reply via email to