Hi Adobe,

I am pulling my hair out here.

I have looked at the framework source now and really understand it. Except for this one little thing that makes NO sense to me.

The way borderMetrics works in Container is obvious; Check to see if there is a border of Rectangular border and return that instance's actual borderMetrics property.

Now, to me this is a STATIC value based on the borderStyle not changing(from the border instance).

I also understand that viewMetricsAndPadding property takes viewMetrics which uses borderMetrics and returns everything.

Why in my override to viewMetrics when calling borderMetrics, does the actual borderMetrics refer to the viewMetrics? IE not returning 1 for 'solid' AFTER viewMetrics has run like twice.

Honestly, I am really good a making components ;-) AND this is really tripping me out, I feel my duslexia clouding the very sunshine I am trying to retain in the vast wasteland of my brain ;-)

CODE

   
    /**
     *
     */
    override public function get viewMetrics():EdgeMetrics
    {
         var v:EdgeMetrics = super.viewMetrics;
         var b:EdgeMetrics = borderMetrics;
        
         trace("viewMetrics", v.left)
         trace("borderMetrics", b.left)
   
        if (dragEnabled) {
             if (direction == "horizontal") {
                 v.left = draggerButton.width;   
             } else {
                 v.top = draggerButton.height;   
             }
         }
         return v;
    }


This is just an example... Calling super to get the first round, if we are dragEnabled, use the draggerButton to create an offset into the view.

When this code is run, the trace is as follows;


viewMetrics 1
borderwMetrics 1
viewMetrics 0
borderwMetrics 0
viewMetrics 15
borderwMetrics 15
viewMetrics 15
borderwMetrics 15
viewMetrics 15
borderwMetrics 15
viewMetrics 15
borderwMetrics 15

??? What is going on, what am I not seeing in the framework that is making it do this?


Peace, Mike

--
What goes up, does come down.

--
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




Reply via email to