<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Axelology &#187; ACJEditor</title>
	<atom:link href="http://www.axelscript.com/category/acjeditor/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.axelscript.com</link>
	<description>Axel Jensen on Flex, Coldfusion and... other stuff</description>
	<lastBuildDate>Thu, 29 Dec 2011 17:03:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>htmlText Alertbox</title>
		<link>http://www.axelscript.com/2009/05/01/htmltext-alertbox/</link>
		<comments>http://www.axelscript.com/2009/05/01/htmltext-alertbox/#comments</comments>
		<pubDate>Fri, 01 May 2009 18:22:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ACJEditor]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Actionscript]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/?p=315</guid>
		<description><![CDATA[Application &#8211; Source We have a product right now that has a basic shopping cart in it&#8230; and one of the options is to save the cart and view it as a pdf&#8230; so we send the request to the server, and return a link back with a link to the pdf, and because we [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.axelscript.com/wp-content/Examples/HTMLTextAlert/HTMLTextAlert.html" target="_blank">Application</a> &#8211; <a href="http://www.axelscript.com/wp-content/Examples/HTMLTextAlert/srcview/index.html" target="_blank">Source</a></p>
<p>We have a product right now that has a basic shopping cart in it&#8230; and one of the options is to save the cart and view it as a pdf&#8230; so we send the request to the server, and return a link back with a link to the pdf, and<br />
 because we may have many messages come back from this one service we just use a simple alert box to show the user the feedback and that the application has saved successfully&#8230; if we need to put a link in there, the user must copy and paste the link in order to use it&#8230; WELLL, the small challenge was to make that a clickable link, and in the least amount of time possible&#8230; (15 minutes, rather than 2 hours for styling and the component itself) (it actually took longer to write the blog post, and put up the example than it did to fix the issue)</p>
<p>I was asked to create a component that allows for htmlText to be added to it, and the component has to have all the functionality of an <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=controls_19.html" target="_blank">Alert</a> box&#8230; so why not extend the alert box, and make something like a BaseAlert.as file that extends Alert&#8230; </p>
<p>because you still have to use Alert.show in your application to use it&#8230; so rather than going to all the work of creating a way to popup the popup from anywhere in the app, and making sure it dispatches CloseEvents like the original Alert box does, I did some digging and found a forum list that gave the greatest tip EVER!  I never really use mx_internal&#8230; frankly it confuses me a little bit&#8230; the syntax is a little wonkey to me&#8230; I&#8217;ve never used the whole &#8220;::&#8221; thing and don&#8217;t really understand what it does&#8230; someone care to explain?</p>
<p>anyway, I thought this persons simple code was absolutely great! </p>
<p><code> var a:Alert=Alert.show("dump text");<br />
            a.mx_internal::alertForm.mx_internal::textField.htmlText =<br />
some HTMl text goes here; </code></p>
<p>here is a link to the <a href="http://groups.google.com/group/flex_india/browse_thread/thread/08987ec9d7548175?pli=1" target="_blank">message post</a></p>
<p>They do neglect to mention that you have to import the internal namespace though, so in my example thats included.  This is a very quick and cheap solution to the problem and just provides a way to fancy up the alert box a little bit by adding the &#8220;limited&#8221; html text that the flash platform supports&#8230; maybe flash 10 will add better htmlText support&#8230;. I would assume so with all of the text changes to the platform&#8230; but I havent looked into it so don&#8217;t quote me&#8230;</p>
<p><a href="http://www.axelscript.com/wp-content/Examples/HTMLTextAlert/HTMLTextAlert.html" target="_blank">Application</a> &#8211; <a href="http://www.axelscript.com/wp-content/Examples/HTMLTextAlert/srcview/index.html" target="_blank">Source</a></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=315&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2009/05/01/htmltext-alertbox/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to use reserved keywords in E4X with flex</title>
		<link>http://www.axelscript.com/2008/04/14/how-to-use-reserved-keywords-in-e4x-with-flex/</link>
		<comments>http://www.axelscript.com/2008/04/14/how-to-use-reserved-keywords-in-e4x-with-flex/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 15:00:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ACJEditor]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/04/14/how-to-use-reserved-keywords-in-e4x-with-flex/</guid>
		<description><![CDATA[This post is a brief note on how to use reserved words like &#8220;id&#8221; and &#8220;class&#8221; with e4x in flex. Basically you have reserved keywords in flex like &#8220;id&#8221; and &#8220;class&#8221; amongst others&#8230; I was traversing through some xhtml that i brought in remotely and it had many div tags. One of the issues I [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a brief note on how to use reserved words like &#8220;id&#8221; and &#8220;class&#8221; with e4x in flex.</p>
<p>Basically you have reserved keywords in flex like &#8220;id&#8221; and &#8220;class&#8221; amongst <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and_Syntax_13.html">others</a>&#8230; I was traversing through some xhtml that i brought in remotely and it had many div tags. One of the issues I ran into with it was trying to manipulate div&#8217;s with certain class attributes&#8230; so i was doing some searching through the html with e4x and trying to grab things with e4x operators like body..div.(@class == &#8216;headlineText&#8217;)  this would theoretically grab all of my div tags that have that class name&#8230;</p>
<p>but the compiler bombs on this and says class is reserved&#8230; so the proper syntax for this is body..div.(@['class'] == &#8216;headline&#8217;) I found this when looking at some <a href="http://www.xml.com/lpt/a/1720" target="_blank">xml standards online</a><br />
NOTE: you may get an error: &#8216;A term is undefined and has no properties&#8217; error when searching for divs that don&#8217;t have the class attribute&#8230; you pretty much have use a for each loop and loop through the div XMLList that you would get back from these operations:</p>
<p>var  body:XML = myXML.body[0];<br />
var divList:XMLList = body..div; //searchs body for all div tags</p>
<p>then you would loop through them.</p>
<p>for each( var p:XML in divList )<br />
{<br />
if( p.@['class'] == &#8216;headlineText&#8217; )<br />
//do something<br />
}<br />
}</p>
<p>for some reason you get an error when trying to filter this way with xml when the attribute isn&#8217;t there&#8230;  this only seems to happen when you use filtering operations like body..div (which gets all of the div&#8217;s) I think it may actually be a bug&#8230; it seems to me this should just return an empty XMLList if there isn&#8217;t any found&#8230; but i guess it just doesnt work&#8230;. hmmm&#8230; anyway</p>
<p>thats all for now.</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=120&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/04/14/how-to-use-reserved-keywords-in-e4x-with-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing ACJEditor its a RTE</title>
		<link>http://www.axelscript.com/2008/04/02/introducing-acjeditor-its-a-rte/</link>
		<comments>http://www.axelscript.com/2008/04/02/introducing-acjeditor-its-a-rte/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 15:00:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ACJEditor]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/04/02/introducing-acjeditor-its-a-rte/</guid>
		<description><![CDATA[Again, another post on how the Flex RichTextEditor blows goats&#8230; I&#8217;ve now completely taken the source from it, and made methods public or protected for extending in addition to adding the xhtmlText property&#8230; You can now override styling in the RichTextEditor and inject inline styles into things like a href tags&#8230; Application - Source This [...]]]></description>
			<content:encoded><![CDATA[<p>Again, another post on how the Flex RichTextEditor blows goats&#8230; I&#8217;ve now completely taken the source from it, and made methods public or protected for extending in addition to adding the xhtmlText property&#8230; You can now override styling in the RichTextEditor and inject inline styles into things like a href tags&#8230;</p>
<p><a href="http://axelscript.com/wp-content/Examples/RichTextEditorExample/RichTextEditorExample.html" target="_blank">Application </a>-<a href="http://axelscript.com/wp-content/Examples/RichTextEditorExample/srcview/index.html" target="_blank"> Source</a></p>
<p>This post is in direct relation with my post a few days ago on <a href="http://www.axelscript.com/2008/03/24/customrichtexteditor-with-xhtml-text/" target="_blank">Customizing the Rich Text Editor</a></p>
<p>This new post adds an example tab that shows when you put in a link in the TextEditor it underlines it in the TextArea&#8230; rather than the ridiculous previous Flex RichTextEditor just leaving it blank, and only changing the cursor when hovering over the tag&#8230; I hate how it doesnt actually underline the link in the text editor&#8230; so I needed to override the setTextStyles() method&#8230; it&#8217;s all about overriding the setTextStyles&#8230; and you just can&#8217;t do that with the default Flex RTE&#8230;</p>
<p>I scrapped the default RTE and copied and pasted out the code&#8230; I don&#8217;t think we will run into any backwards compatibility problems because its just an mxml class.  After taking the code, I made sure to at least put some updated comments in the top of the file ACJEditor.mxml&#8230; I documented that I adjusted the setTextStyles function to now take a new parameter called tf&#8230;</p>
<p>tf is a TextFormat class in flash, any change event in the RTE hits up the setTextStyles and you can pass it your own manipulated TextFormat.  You can do a little bit more with this&#8230; now you can manipulate the htmlText fairly easily to at least show your changes&#8230; I used it to show an underline underneath the &lt;a href &gt; tags&#8230;  I don&#8217;t quite have this working on load, it only seems to be happening on the addition of a link&#8230; I&#8217;m working on that, but pretty much prototyping right now to show it&#8217;s at least now possible&#8230; where as with the Flex RTE it just wasn&#8217;t&#8230; you couldn&#8217;t do jack squat because everything was private&#8230;</p>
<p>so please feel free take a shot at the new example, and get the source&#8230; feel free to manipulate it, and please BLOG ABOUT IT! it helps the community&#8230;</p>
<p>I&#8217;ve also gotten quite a few comments with the other post <a href="http://www.axelscript.com/2008/03/24/customrichtexteditor-with-xhtml-text/" target="_blank">Customizing the Rich Text Editor</a> and one of them mentions having an image show up inside the text editor&#8230; frankly i&#8217;m not even sure if this is possible at all&#8230; i haven&#8217;t fully looked at the TextFormat class yet, but because TextFormat is really what is formatting the html it is internal to flash&#8230; so as far as that goes, and getting it to actually show up in a textArea&#8230; I really am not to sure about that&#8230; </p>
<p><a href="http://axelscript.com/wp-content/Examples/RichTextEditorExample/RichTextEditorExample.html" target="_blank">Application </a>-<a href="http://axelscript.com/wp-content/Examples/RichTextEditorExample/srcview/index.html" target="_blank"> Source</a></p>
<p>anyway&#8230; i suppose thats enough ramblings for now.</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=115&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/04/02/introducing-acjeditor-its-a-rte/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

