Hi All!
Long time ago I have asked the question regarding commitProperties()
implementation in the container that might be a navigation container child:
http://www.mail-archive.com/[email protected]/msg47993.html
Unfortunately, I have not got any answer.
Though we, in our team, use kind of workaround:
override protected function commitProperties() : void {
super.commitProperties();
if (processedDescriptors) {
// Do all properties deferred processing here.
} else {
_commitPropertiesPostponed = true;
}
}
...
private function onInitialize() : void {
if (_commitPropertiesPostponed) {
_commitPropertiesPostponed = false;
invalidateProperties();
}
}
Thus if the commitProperties() is executing and there are no children
created yet (this happens for navigation containers childrent and can be
verified via processedDescriptors), we set the _commitPropertiesPostponed
flag to true and then in initialize event handler reset it and call
invalidateProperties() to execute commitProperties() once again.
Though it looks like a hack.
May be we are doing something wrong and better solution exists?
Sergey.