Ok, I'm trying to write an XML editor to edit stuff like this ... public var myXML:XML = <document key="fish" label_1="p1" label_2="p3 p4"> <graphics valign="middle"> <image alignment="left" filename="dpi"/> </graphics> <line width="3"/> <text alignment="centred" font="A" charheight="2" emphasis="b">Fishing</text> <line width="3"/> <text/> <text alignment="centred" font="A" charheight="2" charwidth="2"><field key="knob"/> twiddle</text> <document>;
----------------------------- Now, I like the idea of using a DataGrid (the alternating colour rows make the XML easy to compartmentlise and read, so that you're editing each one as a separate entity. My first question is, can each row of a DataGrid have a separate and different custom ItemRenderer/Editor? My second question is with the following component, which is the custom itemRenderer that I've been working on ... (The "text" field is currently set to debugging values, rather than the final string it will hold.) <mx:Component id="textEditorRenderer"> <mx:VBox width="100%" height="100%" horizontalAlign="center"> <mx:TextInput id="textEdCustRend" width="100%" height="100%" fontStyle="{([EMAIL PROTECTED] == 'i') ? 'italic' : 'normal'}" fontWeight="{([EMAIL PROTECTED] == 'b') ? 'bold' : 'normal'}" textDecoration="{([EMAIL PROTECTED] == 'u') ? 'underline' : 'none'}" textAlign="{([EMAIL PROTECTED] == 'left') ? 'left' : (([EMAIL PROTECTED] == 'centred') ? 'center' : 'right')}" text="[EMAIL PROTECTED], [EMAIL PROTECTED]"/> </mx:VBox> </mx:Component> Now while the ternary operators used for fontStyle, fontWeight, textDecoration, and textAlign work fine - the following ones in the scaleX and scaleY fields don't work when @charwidth or @charheight is empty. scaleX="{([EMAIL PROTECTED] == '') ? Number(1.0) : Number([EMAIL PROTECTED])}" scaleY="{([EMAIL PROTECTED] == '') ? Number(1.0) : Number([EMAIL PROTECTED])}" Any clues? Ta. John -- 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/