I did a simple test that worked for me. In the creationComplete handler
of a simple app, I did this:
private function testNestLevel():void
{
var s:TextArea = new TextArea();
s.nestLevel = 2;
s.validateNow();
}
In the debugger, I saw validateNow go into the TextArea’s commitProperties.
-Alex
On 3/11/15, 8:36 AM, "Pawan Yadav" <[email protected]> wrote:
>No luck, It didn't work with nestLevel = 2.
>Not getting any call in commitproperties method through validateNow()
>
>
>
>Best Regards
>Pawan
>
>On Wed, Mar 11, 2015 at 8:40 PM, Alex Harui <[email protected]> wrote:
>
>>
>> On 3/11/15, 7:50 AM, "Jeffry Houser" <[email protected]> wrote:
>>
>> >
>> > I did this back in "the day" when creating the watermark I used for
>> >Flextras components. I basically created a component, rendered it, and
>> >turned it into a bitmap before ever putting it on the stage.
>> >
>> > I had to write my own routine to force the component to go through
>> >it's life cycle w/o being added to the stage. I don't remember
>> >specifics. I think it was more complicate than calling validatenow( ),
>> >but at the moment I can't imagine why.
>>
>> Because without a parent, it doesn't go in the queue such that
>>validateNow
>> will process it.
>>
>> I'm not sure it will work, but you could try setting nestLevel=2. That
>> should allow it to go in the queues and get processed by validateNow()
>>or
>> regular layoutManager validation. The question would be whether there
>>are
>> any dependencies on having a parent in the code that will run during
>> invalidation or validation. YMMV.
>>
>> -Alex
>>
>>
>>