[flexcoders] TextArea ignoring new lines
Hi, I am working on old Flex3 (Cairngorm2) app. One of TextArea's there is completely ignoring new lines (Carriage Return/Line Feed) and even skips some spaces (others work fine). Code is pretty simple (well, little simplified here): fx:TextArea text=myText selectable=true change=updateText(event)/ ... private function updateText(evt:Event):void { var event:UpdateEvent = new UpdateEvent(UpdateEvent.UPDATE_EVENT); event.myText=myText.text; trace(myText+event.myText) //added by me event.dispatch(); } I have read about weird behaviors of TextArea (skipping or even doubling some characters) on the net, but so far could not find anything applicable in that case. For example, something likemyText.text.replace(\n, \r) doesn't change anything. I guess, there is no \n there. If I trace, it returns line without newlines (like: 'startskip1lineskip2linesend;'). But if I copy-paste that line to say another TextArea on the screen (or non flex Chat app, I would get multiline text: 'start skip1line skip2lines end; And for various reasons I can't debug that app. Any idea what might be wrong and how to fix it? Please help! TIA, Oleg. P.S.: App connects to SPs in the Database via Web Service. No BlazeDS.
[flexcoders] TextArea ignoring new lines
Hi, I am working on old Flex3 (Cairngorm2) app. One of TextArea's there is completely ignoring new lines (Carriage Return/Line Feed) and even skips some spaces (others work fine). Code is pretty simple (well, little simplified here): fx:TextArea text=myText selectable=true change=updateText(event)/ ... private function updateText(evt:Event):void { var event:UpdateEvent = new UpdateEvent(UpdateEvent.UPDATE_EVENT); event.myText=myText.text; trace(myText+event.myText) //added by me event.dispatch(); } I have read about weird behaviors of TextArea (skipping or even doubling some characters) on the net, but so far could not find anything applicable in that case. For example, something likemyText.text.replace(\n, \r) doesn't change anything. I guess, there is no \n there. If I trace, it returns line without newlines (like: 'startskip1lineskip2linesend;'). But if I copy-paste that line to say another TextArea on the screen (or non flex Chat app, I would get multiline text: 'start skip1line skip2lines end; And for various reasons I can't debug that app. Any idea what might be wrong and how to fix it? Please help! TIA, Oleg. P.S.: App connects to SPs in the Database via Web Service. No BlazeDS.
[flexcoders] TextArea ignoring new lines
Hi, I am working on old Flex3 (Cairngorm2) app. One of TextArea's there is completely ignoring new lines (Carriage Return/Line Feed) and even skips some spaces (others work fine). Code is pretty simple (well, little simplified here): fx:TextArea text=myText selectable=true change=updateText(event)/ ... private function updateText(evt:Event):void { var event:UpdateEvent = new UpdateEvent(UpdateEvent.UPDATE_EVENT); event.myText=myText.text; trace(myText+event.myText) //added by me event.dispatch(); } I have read about weird behaviors of TextArea (skipping or even doubling some characters) on the net, but so far could not find anything applicable in that case. For example, something likemyText.text.replace(\n, \r) doesn't change anything. I guess, there is no \n there. If I trace, it returns line without newlines (like: 'startskip1lineskip2linesend;'). But if I copy-paste that line to say another TextArea on the screen (or non flex Chat app, I would get multiline text: 'start skip1line skip2lines end; And for various reasons I can't debug that app. Any idea what might be wrong and how to fix it? Please help! TIA, Oleg. P.S.: App connects to SPs in the Database via Web Service. No BlazeDS.
[flexcoders] Re: TextArea ignoring new lines
I have '\r' r characters in that myTextArea.text, but not '\n' n ones. Should I try to replace r with n? Any useful TextArea properties to display new lines? Please advise. TIA, Oleg --- In flexcoders@yahoogroups.com, Oleg Konovalov wrote: Hi, I am working on old Flex3 (Cairngorm2) app. One of TextArea's there is completely ignoring new lines (Carriage Return/Line Feed) and even skips some spaces (others work fine). Code is pretty simple (well, little simplified here): ... private function updateText(evt:Event):void { var event:UpdateEvent = new UpdateEvent(UpdateEvent.UPDATE_EVENT); event.myText=myText.text; trace(myText+event.myText) //added by me event.dispatch(); } I have read about weird behaviors of TextArea (skipping or even doubling some characters) on the net, but so far could not find anything applicable in that case. For example, something likemyText.text.replace(\n, \r) doesn't change anything. I guess, there is no \n there. If I trace, it returns line without newlines (like: 'startskip1lineskip2linesend;'). But if I copy-paste that line to say another TextArea on the screen (or non flex Chat app, I would get multiline text: 'start skip1line skip2lines end; And for various reasons I can't debug that app. Any idea what might be wrong and how to fix it? Please help! TIA, Oleg. P.S.: App connects to SPs in the Database via Web Service. No BlazeDS.
[flexcoders] TextArea ignoring new lines
Hi, I am working on old Flex3 (Cairngorm2) app. One of TextArea's there is completely ignoring new lines (Carriage Return/Line Feed) and even skips some spaces (others work fine). Code is pretty simple (well, little simplified here): fx:TextArea text=myText selectable=true change=updateText(event)/ ... private function updateText(evt:Event):void { var event:UpdateEvent = new UpdateEvent(UpdateEvent.UPDATE_EVENT); event.myText=myText.text; trace(myText+event.myText) //added by me event.dispatch(); } I have read about weird behaviors of TextArea (skipping or even doubling some characters) on the net, but so far could not find anything applicable in that case. For example, something likemyText.text.replace(\n, \r) doesn't change anything. I guess, there is no \n there. If I trace, it returns line without newlines (like: 'startskip1lineskip2linesend;'). But if I copy-paste that line to say another TextArea on the screen (or non flex Chat app, I would get multiline text: 'start skip1line skip2lines end; And for various reasons I can't debug that app. Any idea what might be wrong and how to fix it? Please help! TIA, Oleg. P.S.: App connects to SPs in the Database via Web Service. No BlazeDS.
[flexcoders] From DataGrid to Clipboard and Excel
Hi, I need to add the following to my Flex4 Web App: 1) being able to select some cells from AdvancedDataGrid and copy it to Clipboard (to be able to paste to any file like Word, Excel, CSV or text file 2) being able to export the whole ADG context to Excel. Could you please suggest how to do it? (read lots of posts, but honestly none useful) Thank you in advance , Oleg.
[flexcoders] Dynamic DataGrid
Hi, I am trying to create dynamic DataGrid, which shows columns only if it contains data returned by query (it has 10+ columns, so not easy to calculate sizes).. I read a lot of posts on the net, tried minWidth, ResizeMode, etc. Nothing really useful which works. In most cases it created very narrow columns except the last one - super wide. Please help! (using Flex4 AdvancedDataGrid) -- Thank you in advance, Oleg.
[flexcoders] Dynamic DataGrid
Hi, I am trying to create dynamic DataGrid, which shows columns only if it contains data returned by query (it has 10+ columns, so not easy to calculate sizes).. I read a lot of posts on the net, tried minWidth, ResizeMode, etc. Nothing really useful which works. In most cases it created very narrow columns except the last one - super wide. Please help! (using Flex4 AdvancedDataGrid) -- Thank you in advance, Oleg.
[flexcoders] Re: Grouping visually in ADG
How can I set borderThickness of AdvancedDataGridColumnGroup ? Doesn't seem to work through styleFunction - it removes the context text of included ADGColumns. Can I do it in itemRenderer ? Any code samples? OR: Can I use BorderContainer in an itemRenderer of ADGColumnGroup? If I place ADGColumns inside it, Flex compiler shows errors like ADGColumn declaration must be contained within Declaration tag, since it's not assignable to the the default property's element type IVisualElement. How can I declare ADGColumn outside it's DataGrid? Sorry, I am fairly new to Flex4. Please advise, Oleg. --- In flexcoders@yahoogroups.com, Oleg Konovalov olegkon@... wrote: Hi, I need to group some ADG columns visually, i.e. embolden lines in ADG around a group of columns, but avoid creating multiple header rows, just one level. So imagine you have columns containing countries, and you want to group them by continent (UK, France, Germany ;USA, Mexico, Canada; etc.) Is there a way to do it in ADG ? I am trying to do it by creating item renderer and applying it on AdvancedDataGridColumnGroup level. Is that correct approach? Any code samples? Please advise! Using FB4.5.1 TIA, Oleg.
[flexcoders] Grouping visually in ADG
Hi, I need to group some ADG columns visually, i.e. embolden lines in ADG around a group of columns, but avoid creating multiple header rows, just one level. So imagine you have columns containing countries, and you want to group them by continent (UK, France, Germany ;USA, Mexico, Canada; etc.) Is there a way to do it in ADG ? I am trying to do it by creating item renderer and applying it on AdvancedDataGridColumnGroup level. Is that correct approach? Any code samples? Please advise! Using FB4.5.1 TIA, Oleg.