I found the problem. It's in my CSS file. If there's a "borderStyle"
property as defined below the application hangs. Take out the
"borderStyle" property and the app runs.
See my test code below (FYI: it does not do much. My first attempt at
border skinning using code)...
------------------------------------
GRIDBORDERS.CSS ยป HERE'S THE PROBLEM
------------------------------------
Application
{
background-color: #FFFAC7;
}
GridItem
{
borderStyle: solid;
borderSkin: ClassReference('GridBorders');
}
----------------
GRIDBORDERS.MXML
----------------
<?xml version="1.0"?>
<mx:Application pageTitle="Grid Borders"
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Style source="GridBorders.css"/>
<mx:Grid height="640" width="940">
<mx:GridRow width="100%" height="66%">
<mx:GridItem width="66%" height="100%" >
</mx:GridItem>
<mx:GridItem width="33%" height="100%" >
</mx:GridItem>
</mx:GridRow>
<mx:GridRow width="100%" height="33%" >
<mx:GridItem colSpan="2" width="100%" height="100%" >
</mx:GridItem>
</mx:GridRow>
</mx:Grid>
</mx:Application>
--------------
GRIDBORDERS.AS
--------------
package
{
import mx.skins.*;
import mx.containers.Grid;
import flash.display.*;
import flash.utils.*;
public class GridBorders extends Border
{
public function GridBorders()
{
super();
}
override protected function updateDisplayList( w:Number,
h:Number
):void
{
graphics.lineStyle( 15, 0xFFFF00, 0 );
graphics.beginFill( 0xFFFF00, 1.0 );
graphics.drawRect( 0, 0, 10, height );
graphics.endFill();
}
private var _borderMetrics:EdgeMetrics = new EdgeMetrics(1, 1,
1, 1);
override public function get borderMetrics():EdgeMetrics
{
return _borderMetrics;
}
}
}
--
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/