Yeah, ther problems I was seeing are twofold:
1. Pasted-in text loses all newlines
2. Debug inspection of "preset" text using this syntax:
<mx:TextArea height="50%" width="100%" id="template" wordWrap="false"
change="trace(template.text)">
<mx:text><![CDATA[
package fundsmanagement.business.commands
{
import intelligentpathways.framework.core.CommandEvent;
#each field in fields#
//$field$
private var _$field.name$ : $field.type$;
#end each field#
public class $cmdClassName$ extends CommandEvent
{
public static const $constName$ : String = "$eventType$";
public function $cmdClassName$()
{
super($constName$);
}
}
}
]]></mx:text>
</mx:TextArea>
Shows that instead of "\n" I get "\r", like it's stuck in MacOS 9 mode or
something *shudder*
-Josh
On Wed, Oct 22, 2008 at 10:14 PM, Kenneth Sutherland <
[EMAIL PROTECTED]> wrote:
> I think I get what you're meaning but I've not got a mac and I'm not
> seeing the issue on my PC (is the issue happening on a PC). If you look at
> the debug window it will not show you the \n or \r but if you look at the
> value next to the name of the var in the debug window you will see the \n or
> \r chars. You could alternately look at the htmlText property and you
> should see all of the formatting there.
>
>
>
> Kenneth.
>
>
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Josh McDonald
> *Sent:* 22 October 2008 10:42
> *To:* [email protected]
> *Subject:* Re: [flexcoders] WTF? When pasting into a textarea (on mac),
> all my newlines disappear!
>
>
>
> As in, I type something in any text editor (or just hilight & cmd-c in the
> console, etc), go to a textarea and hit cmd-v. Visually in the textarea it
> looks like it should, but .text has no newlines.
>
> On Wed, Oct 22, 2008 at 6:54 PM, Kenneth Sutherland <
> [EMAIL PROTECTED]> wrote:
>
> How are you doing the code to copy and paste?
>
> Setting up a sting in MXML can look different than if you set it in
> actionscript. This may well be the issue.
>
> Eg.
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical
> ">
>
> <mx:Script >
>
> <![CDATA[
>
> *private* *var* word : String = *"&\n hello"*;
>
>
>
> ]]>
>
> </mx:Script>
>
> <*mx:VBox*>
>
> <mx:TextArea text="{word}" />
>
> <mx:TextArea text="&\n hello" />
>
>
>
> </mx:VBox>
>
> </mx:Application>
>
>
>
> This displays
>
> &
>
> hello
>
> in the first box and
>
>
>
> &\n hello
>
> In the second box.
>
>
>
> HTH or at least gives you something to look into,
>
> Kenneth.
>
>
>
>
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Josh McDonald
> *Sent:* 22 October 2008 08:25
> *To:* [email protected]
> *Subject:* [flexcoders] WTF? When pasting into a textarea (on mac), all my
> newlines disappear!
>
>
>
> Hey guys,
>
> I'm having this problem on safari and Firefox, and it's a *big* problem.
> Any time I paste a bunch of text into my <mx:textarea/> it all looks OK, but
> the newlines aren't really there. Trace(comp.text) shows they're not there,
> and if I copy from the textarea they're gone.
>
> Is this a known bug, or am I forgetting some magic setting or something? I
> *really* need to be able to paste into this app!
>
> -Josh
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> Like the cut of my jib? Check out my Flex blog!
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
> :: http://flex.joshmcdonald.info/
>
>
>
> Disclaimer
> ------------------------------
>
> This electronic message contains information which may be privileged and
> confidential. The information is intended to be for the use of the
> individual(s) or entity named above. If you are not the intended recipient,
> be aware that any disclosure, copying, distribution or use of the contents
> of this information is prohibited. If you have received this electronic
> message in error, please notify us by telephone on 0131 476 6000 and delete
> the material from your computer.
> Registered in Scotland number: SC 172507.
> Registered office address: Quay House 142 Commercial Street Edinburgh EH6
> 6LB.
>
> This email message has been scanned for viruses by Mimecast.
> ------------------------------
>
>
>
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> Like the cut of my jib? Check out my Flex blog!
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
> :: http://flex.joshmcdonald.info/
>
>
>
> Disclaimer
>
> ------------------------------
> This electronic message contains information which may be privileged and
> confidential. The information is intended to be for the use of the
> individual(s) or entity named above. If you are not the intended recipient,
> be aware that any disclosure, copying, distribution or use of the contents
> of this information is prohibited. If you have received this electronic
> message in error, please notify us by telephone on 0131 476 6000 and delete
> the material from your computer.
> Registered in Scotland number: SC 172507.
> Registered office address: Quay House 142 Commercial Street Edinburgh EH6
> 6LB.
>
> This email message has been scanned for viruses by Mimecast.
> ------------------------------
>
>
--
"Therefore, send not to know For whom the bell tolls. It tolls for thee."
Like the cut of my jib? Check out my Flex blog!
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]
:: http://flex.joshmcdonald.info/