Hello, I apologize if this is a duplicate message; my messages do not seem to be appearing on the Yahoo forum.
A friend looked this over and he found what was going on: - GridBorders.as and GridBorders.mxml are both going to create a class called GridBorders, which is bad. The mxml one takes precendence, so the entire application is being used as the border skin. Then that app. has a border skin which is the app. again, and you have a recursive situation. If you rename GridBorders.mxml to GridBordersTest.mxml, the recursion won't occur. - In the .as file, mx.core.EdgeMetrics needs to be imported. - Also in the .as file, graphics.clear() is needed at the top of updateDisplayList. - Rob -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris Simeone Sent: Thursday, September 14, 2006 12:11 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Programmatic Skinning bug in Flex? 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 -- 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/