Hello FlexCoders,

Recently I have discovered very weird bug in ViewStack, I haven't been
able to reproduce it yet, will do that later, so in the meantime I
started to explore Flex source files, and look what interesting code I
see there(see attachment)

This is just excerpt from one file, I haven't touched others.

I'm not a programmer Guru, but I know few things like Duplication is bad!

So how Adobe can create such code??? Are you sleep well after this?
Or this is new Design Pattern called "Copy/Paste"?

And it is no wonder why there is so much bugs after this! Shame on you!

Best regards
Stanislav


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
        static function invalidateProperties(obj:UIObject):Void
        {
                if (!commitPending)
                {
                        commitPending = true;
                        if (!doLaterPending)
                        {
                                if (_root._layoutManager == undefined)
                                {
                                        if (myMCDepth == undefined)
                                                myMCDepth = 
mx.managers.DepthManager.highestDepth--;
                                        myMC = 
_root.createClassObjectWithStyles(UIObject, "_layoutManager", myMCDepth);
                                        myMC.doLater(LayoutManager, 
"waitAFrame");
                                        
EventDispatcher.initialize(LayoutManager);
                                }
                                else
                                {
                                        myMC.doLater(LayoutManager, 
"doPhasedInstantiation");
                                }
                                doLaterPending = true;
                        }
                }
                
                // trace("LayoutManager adding " + obj.className + " " + obj + 
" to commit queue");
                commitQueue.push(obj);
                obj.waitingForLayoutManager = true;
        }

        static function invalidateSize(obj:UIObject):Void
        {
                if (!measurementPending)
                {
                        measurementPending = true;
                        if (!doLaterPending)
                        {
                                if (_root._layoutManager == undefined)
                                {
                                        if (myMCDepth == undefined)
                                                myMCDepth = 
mx.managers.DepthManager.highestDepth--;
                                        myMC = 
_root.createClassObjectWithStyles(UIObject, "_layoutManager", myMCDepth);
                                        myMC.doLater(LayoutManager, 
"waitAFrame");
                                        
EventDispatcher.initialize(LayoutManager);
                                }
                                else
                                {
                                        myMC.doLater(LayoutManager, 
"doPhasedInstantiation");
                                }
                                doLaterPending = true;
                        }
                }
                // trace("LayoutManager adding " + obj.className + " " + obj + 
" to size queue");
                measurementQueue.addObject(obj, obj.nestLevel);
                obj.waitingForLayoutManager = true;
        }

        static function invalidateLayout(obj:UIObject):Void
        {
                if (!layoutPending)
                {
                        layoutPending = true;
                        if (!doLaterPending)
                        {
                                if (_root._layoutManager == undefined)
                                {
                                        if (myMCDepth == undefined)
                                                myMCDepth = 
mx.managers.DepthManager.highestDepth--;
                                        myMC = 
_root.createClassObjectWithStyles(UIObject, "_layoutManager", myMCDepth);
                                        myMC.doLater(LayoutManager, 
"waitAFrame");
                                        
EventDispatcher.initialize(LayoutManager);
                                }
                                else
                                {
                                        myMC.doLater(LayoutManager, 
"doPhasedInstantiation");
                                }
                                doLaterPending = true;
                        }
                }
                //trace("LayoutManager adding " + obj.className + " " + obj + " 
to layout queue");
                layoutQueue.addObject(obj, obj.nestLevel);
                obj.waitingForLayoutManager = true;
        }

        static function invalidateDraw(obj:UIObject):Void
        {
                if (!drawPending)
                {
                        drawPending = true;
                        if (!doLaterPending)
                        {
                                if (_root._layoutManager == undefined)
                                {
                                        if (myMCDepth == undefined)
                                                myMCDepth = 
mx.managers.DepthManager.highestDepth--;
                                        myMC = 
_root.createClassObjectWithStyles(UIObject, "_layoutManager", myMCDepth);
                                        myMC.doLater(LayoutManager, 
"waitAFrame");
                                        
EventDispatcher.initialize(LayoutManager);
                                }
                                else
                                {
                                        myMC.doLater(LayoutManager, 
"doPhasedInstantiation");
                                }
                                doLaterPending = true;
                        }
                }
                // trace("LayoutManager adding " + obj.className + " " + obj + 
" to draw queue");
                drawQueue.push(obj);
                obj.waitingForLayoutManager = true;
        }







Reply via email to