<?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>Kerkness.ca &#187; Components</title>
	<atom:link href="http://www.kerkness.ca/tagged/components/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kerkness.ca</link>
	<description>flexing my kerkness, among other things</description>
	<lastBuildDate>Wed, 14 Oct 2009 15:12:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Overview of Claire Components</title>
		<link>http://www.kerkness.ca/overview-of-claire-components/</link>
		<comments>http://www.kerkness.ca/overview-of-claire-components/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 04:00:18 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[claire]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/?p=270</guid>
		<description><![CDATA[This is a partial list of components which can be found in the Claire library.

AlertTimer
Based on the main Alert controller for Flex.  AlertTimer will display a countdown and automatically close after the desired number of seconds.
AutoComplete
My take on creating an AutoComplete text input component.
ButtonPanel
Button Panel puts a button in your panel.
DateInput
A simple TextInput which allows [...]]]></description>
			<content:encoded><![CDATA[<p>This is a partial list of components which can be found in the Claire library.</p>
<ul>
<li><em><strong><a href="http://www.kerkness.ca/?p=14">AlertTimer</a></strong></em><br />
Based on the main Alert controller for Flex.  AlertTimer will display a countdown and automatically close after the desired number of seconds.</li>
<li><em><strong>AutoComplete</strong></em><br />
My take on creating an AutoComplete text input component.</li>
<li><em><strong>ButtonPanel</strong></em><br />
Button Panel puts a button in your panel.</li>
<li><em><strong>DateInput</strong></em><br />
A simple TextInput which allows the selction of a date using a calendar pop-up.  Perhaps a redundant class but I didn&#8217;t like the look/feel of the default Flex component which provides the same functionality.</li>
<li><em><strong>LockImage</strong></em><br />
A simple image component which displays a &#8216;Lock&#8217; icon in either a locked or an unlocked state.</li>
<li><em><strong>TagInput</strong></em><br />
Based on my own AutoComplete component, TagInput is good for editing a list of &#8216;tags&#8217;.</li>
<li><em><strong><a href="http://www.kerkness.ca/?p=50">Uploader</a></strong></em><br />
Yet another file upload component.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/overview-of-claire-components/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Component : ButtonPanel puts a button in your panel header</title>
		<link>http://www.kerkness.ca/flex-component-buttonpanel-puts-a-button-in-your-panel-header/</link>
		<comments>http://www.kerkness.ca/flex-component-buttonpanel-puts-a-button-in-your-panel-header/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 07:21:00 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/blog/?p=58</guid>
		<description><![CDATA[It&#8217;s always a joy when you need something and after writing a few lines of code, you have it. Such is the beauty of nice extendable components and the Flex architecture.
Today I needed a panel which had a button in the top right corner of the header. Where the &#8217;status&#8217; text is normally is.  [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always a joy when you need something and after writing a few lines of code, you have it. Such is the beauty of nice extendable components and the Flex architecture.</p>
<p>Today I needed a panel which had a button in the top right corner of the header. Where the &#8217;status&#8217; text is normally is.  I wanted to put a &#8217;save&#8217; button there.  One problem, the mx.containers.Panel component does not have a button in the header.</p>
<p>Solution.  Make a new component which extends all the functions of the Panel and stick a button in the top corner where I want.</p>
<p><a href="http://kerkness.ca/flexexamples/ButtonPanel/ButtonPanelDemo.html">Click here to see a demo</a><a href="http://draft.blogger.com/goog_1222914079825"><br /></a><br /><a href="http://kerkness.ca/flexexamples/ButtonPanel/srcview/index.html">Click here to view the source</a></p>
<p>My new ButtonPanel component extends Panel and adds 2 new properties and 1 event.</p>
<p><b>Properties</b></p>
<p>buttonLabel : <i>String</i> &#8211; Defines the label for the button in the top corner<br />buttonPadding : <i>Number</i> &#8211; Defines how much padding to provide in the header</p>
<p><b>Event</b></p>
<p>buttonClick : <i>Event</i> &#8211; Dispatched when the button is clicked</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/flex-component-buttonpanel-puts-a-button-in-your-panel-header/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Updated Flex Qwerty Component</title>
		<link>http://www.kerkness.ca/updated-flex-qwerty-component/</link>
		<comments>http://www.kerkness.ca/updated-flex-qwerty-component/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 00:24:00 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/blog/?p=51</guid>
		<description><![CDATA[I&#8217;ve made some updates and improvements to my Flex Qwerty Keyboard Component.
This version of the component is a little more tailored for a touch screen kiosk and is modled a little after the soft-touch keyboard you see on Apples&#8217; iPhone.  The main new features are shortcut buttons for typing &#8216;.com&#8217; and &#8216;.ca&#8217; (cause I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made some updates and improvements to my <a href="http://kerkness.blogspot.com/2008/02/flex-on-screen-qwerty-keyboard.html">Flex Qwerty Keyboard Component</a>.</p>
<p>This version of the component is a little more tailored for a touch screen kiosk and is modled a little after the soft-touch keyboard you see on Apples&#8217; iPhone.  The main new features are shortcut buttons for typing &#8216;.com&#8217; and &#8216;.ca&#8217; (cause I&#8217;m Canadian)  as well as a &#8216;Tab&#8217; button for tabbing through form fields.</p>
<p><a href="http://www.kerkness.ca/flexexamples/QwertyDemo/QwertyDemo.html">You can view a demo of the updated component here.</a></p>
<p><a href="http://www.kerkness.ca/flexexamples/QwertyDemo/srcview/index.html">You can view the source code for the updated component here.</a></p>
<p><span style="font-size:130%;"><b>How to Customize this Component<br /></b></span><br />I&#8217;ve had a few comments and questions about how to customize this component.  It should be fairly straight forward to do if all you want to do is add or modify how a button works.  Here are instructions on how to add an &#8216;Enter&#8217; or &#8216;Return&#8217; button to the keyboard.
<ol>
<li>First step is to physically add the button to the keyboard.  This can be done by adding a new object to one of the <i><b>keyRow</b></i> arrays in the <i>qwerty.mxml</i> file. Adding the following object to the end of the <i><b>keyRowC</b></i> array will add the button to the end of row 3 of the keyboard.
<pre>{label:'Return',w:100}</pre>
<p>The property &#8216;w&#8217; specifies that the button should be 100 pixels wide.  Alternatively you could set the property &#8216;flex&#8217; to &#8216;true&#8217; which would make the button take up as much available space as is available.</p>
</li>
<li>Next you need to instruct the component on how to handle the click event for this new button.  You do this by adding a condition to the switch statement in the function <i><b>handleKeyClick</b></i>().  Add the following condition for the new Return button.
<pre>case 'Return': this.inputControl.text += "n";break;</pre>
</li>
<li>Finally we need to modify the function which handles toggling between Upper and Lower case on the keyboard.  We don&#8217;t want our new button to be affected by this toggling so we will adjust this function to bypass our new button.
<p>In the function  <b><i>toggleUpperLower</i></b>()  edit the following line  from this&#8230;
<pre>if ( kidLabel == 'Tab' || kidLabel == 'Delete' ) continue;</pre>
<p>to this&#8230;
<pre>if ( kidLabel == 'Tab' || kidLabel == 'Delete' || kidLabel == 'Return' ) continue;</pre>
</li>
</ol>
<p>There you go, you should have a functional return button.  If you have any problems with this example please let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/updated-flex-qwerty-component/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Flex Component : Yet Another Flex File Upload Component</title>
		<link>http://www.kerkness.ca/flex-component-yet-another-flex-file-upload-component/</link>
		<comments>http://www.kerkness.ca/flex-component-yet-another-flex-file-upload-component/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 02:42:00 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/blog/?p=50</guid>
		<description><![CDATA[There are several Flex upload components floating around and I gave most of them a good look over but I was not able to find one which suited my needs so I decided to make my own.  Here it is for you to enjoy.
Click here to view a demo
(demo lets you upload up to [...]]]></description>
			<content:encoded><![CDATA[<p>There are several Flex upload components floating around and I gave most of them a good look over but I was not able to find one which suited my needs so I decided to make my own.  Here it is for you to enjoy.</p>
<p><a href="http://www.kerkness.ca/flexexamples/uploader/UploadExample.html">Click here to view a demo</a><br />
<span style="font-size:85%;">(demo lets you upload up to 3 files at a time with a max size of 4 megs each)<br />
</span><br />
<a href="http://www.kerkness.ca/flexexamples/uploader/srcview/index.html">Click here to view the source</a></p>
<p>The usage of the component is pretty straight forward. You can set some properties to define what types of files can be uploaded and you direct the &#8216;upload&#8217; towards a server side script.  In my demo I send the files to a basic PHP script ( which I&#8217;ve included below ).  The script handles one file at a time and is expected to report back either the string &#8217;successful&#8217;  or an error message which is displayed.</p>
<p><span style="font-weight: bold;font-size:180%;">Properties</span></p>
<p>The following public properties can be set to customize the use of this component</p>
<ul>
<li><span style="font-style: italic;">uploadButtonLabel</span> : String = &#8216;Upload&#8217;<br />
This is the label used for the &#8216;upload&#8217; button.</li>
<li><span style="font-style: italic;">selectButtonLabel</span> : String = &#8216;Select File(s)&#8217;<br />
This is the label used for the &#8217;select&#8217; button.</li>
<li><span style="font-style: italic;">removeButtonLabel </span>: String = &#8216;Remove Selected File&#8217;<br />
This is the label used for the &#8216;remove&#8217; button.</li>
<li><span style="font-style: italic;">maxFileCount </span>: Number = 3<br />
This sets the number of files a user is allowed to upload</li>
<li><span style="font-style: italic;">maxFileSize </span>: Number = 1<br />
This sets the maximum file size (in megs) for each individual file. Default is 1 meg.</li>
<li><span style="font-style: italic;">requestUrl</span> : String = &#8221;<br />
This is the URL for your PHP/ASP/ColdFusion/Other script which you will send the uploaded files to. THIS PROPERTY MUST BE SET !</li>
<li><span style="font-style: italic;">allowOnlyImages </span>: Boolean = false<br />
If set to &#8216;true&#8217;  the user will only be able to select image files</li>
<li><span style="font-style: italic;">allowOnlyText </span>: Boolean = false<br />
If set to &#8216;true&#8217;  the user will only be able to select text files.</li>
<li><span style="font-style: italic;">allowAllFiles </span>: Boolean = true<br />
If set to &#8216;true&#8217; the user can upload images or text files.</li>
<li><span style="font-style: italic;">barColor </span>: String<br />
Allows you to style the progress bar</li>
</ul>
<p><span style="font-size:180%;"><span style="font-weight: bold;">Events</span><br />
</span><br />
The component has one event &#8216;uploadComplete&#8217;  which is triggered if all files are uploaded successfully.</p>
<p><span style="font-size:180%;"><span style="font-weight: bold;">The PHP Handler</span><br />
</span><br />
Following is the source for the simple PHP script which I am using in the demo. In this script I am just confirming that the file was uploaded successfully and then I am deleting it.  Since this is a public demo I don&#8217;t want people filling up my server with unwanted images.  In your script you would most likely copy the FILE to a more permanent location and possibly do a little more validation.  The script needs to echo the string &#8217;success&#8217;  or echo an error message.</p>
<pre>
$hasError = false;foreach( $_FILES as $i=&gt;$file ){
   if ( $file['error'] ){
      $hasError = true;
  }
  /**
    * Because this is a public example. I am just going to immediately delete
    * the file which was uploaded.  In a regular application you would copy the file
    * from it's temporary location to it's permament location.
    */
   unlink( $file['tmp_name'] );
 }
if ( ! $hasError ){
  echo('success');
} else {
  echo('Stick custom error message here');
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/flex-component-yet-another-flex-file-upload-component/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Something I need to remember about ItemRenderers and the TileList control</title>
		<link>http://www.kerkness.ca/something-i-need-to-remember-about-itemrenderers-and-the-tilelist-control/</link>
		<comments>http://www.kerkness.ca/something-i-need-to-remember-about-itemrenderers-and-the-tilelist-control/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 21:10:00 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/blog/?p=48</guid>
		<description><![CDATA[From a high level perspective, scrolling is moving data through fixed itemRenderers, not by actually moving renderers off the visible area of 
the screen.
I found this little bit of information hidden in this thread. After trying to extensively use my PageList component in a large application and with a dataProvider that had the potential of [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><span>From a high level perspective, scrolling is moving </span><span>data through fixed <strong class="highlight">itemRenderers</strong>, not by actually moving renderers <strong class="highlight">off</strong> the visible area <strong class="highlight">of</strong> </span><br />
<span>the screen.</span></p></blockquote>
<p>I found this little bit of information hidden in <a href="http://www.nabble.com/Re%3A-TileList-and-itemrenderer-customization-p14564260.html">this thread</a>. After trying to extensively use my PageList component in a large application and with a dataProvider that had the potential of providing hundreds of items needing rendering I was noticing a very bad side effect. My application would continue to create a new instance of the itemRenderer for every item in the dataProvider and if the dataProvider was emptied ( ie:  arrayCollection.removeAll() ) the itemRenderers would remain.</p>
<p>Back to the drawing board on that one.   I hope to post a new PageList component soon as my application is not usable in it&#8217;s current state.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/something-i-need-to-remember-about-itemrenderers-and-the-tilelist-control/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex SuperLabel Component : An Easy How To on Extending Flex Components with Custom Events and Effects</title>
		<link>http://www.kerkness.ca/flex-superlabel-component-an-easy-how-to-on-extending-flex-components-with-custom-events-and-effects/</link>
		<comments>http://www.kerkness.ca/flex-superlabel-component-an-easy-how-to-on-extending-flex-components-with-custom-events-and-effects/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 00:15:00 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/blog/?p=31</guid>
		<description><![CDATA[Since I switched from developing XUL/Javascript based RIAs using the Mozilla platform to programming in Flex and Actionscript one of the things I have been most impressed with is how easy it is to extend existing components and customize them to fit my needs perfectly.
Recently (as in 10 minutes ago) I was working on laying [...]]]></description>
			<content:encoded><![CDATA[<p>Since I switched from developing XUL/Javascript based RIAs using the Mozilla platform to programming in Flex and Actionscript one of the things I have been most impressed with is how easy it is to extend existing components and customize them to fit my needs perfectly.</p>
<p>Recently (as in 10 minutes ago) I was working on laying out the interface for a new application which displays some dynamically changing content. One part of the interface which was dynamically changing was the page title which I was displaying as a <span style="font-style: italic;">Label </span>component. I thought it would be nice to add a small effect every time the <span style="font-style: italic;">text </span>property for <span style="font-style: italic;">Label </span>changed.  Looking at the language reference documentation for the <span style="font-style: italic;">Label </span>component I noticed there was no built in event or effect which could be triggered when the text property is updated.</p>
<p>No problem, I thought.  I&#8217;ll just add that in.  So with less than 25 lines of code and in less time than it is taking to type this post I was done.</p>
<p>Here is a summary of the steps I took to create my new <span style="font-style: italic;">SuperLabel </span>Component.
<ul>
<li>Created a new Actionscript Class</li>
<li>Added Metatags for the new Event and new Effect</li>
<li>Created a function which overrides the text property setter function</li>
<li>done.</li>
</ul>
<p>Here is the source code for the new component.
<pre>package claire.com{ import mx.controls.Label;   import flash.events.Event; 

 [Event(name="textChange", type="flash.events.Event")] [Effect(name="textChangeEffect", event="textChange")]

 public class SuperLabel extends Label {   public function SuperLabel()   {      super();   }   public override function set text(value:String):void   {     if ( value != this.text )     {        this.dispatchEvent( new Event('textChange') );     }     super.text = value;   } }}</pre>
<p>There you go. It really is that easy.</p>
<p>Just to finish off here is how you use the new component in MXML.
<pre>&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="claire.com.*"&gt;&lt;mx:WipeRight id="myEffect" duration="750" /&gt;&lt;com:SuperLabel textChangeEffect="{myEffect}"/&gt;&lt;/Application&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/flex-superlabel-component-an-easy-how-to-on-extending-flex-components-with-custom-events-and-effects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control Access to Flex Components with Group Based Permissions</title>
		<link>http://www.kerkness.ca/control-access-to-flex-components-with-group-based-permissions/</link>
		<comments>http://www.kerkness.ca/control-access-to-flex-components-with-group-based-permissions/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 03:21:00 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/blog/?p=28</guid>
		<description><![CDATA[When building a large application which has many different views it&#8217;s likely that you&#8217;ll want to grant some users more access than others.  You might have some components that all guests are permitted to view and also have other components that only admin users are allowed to use.
A common way to accomplish this is [...]]]></description>
			<content:encoded><![CDATA[<p>When building a large application which has many different views it&#8217;s likely that you&#8217;ll want to grant some users more access than others.  You might have some components that all guests are permitted to view and also have other components that only admin users are allowed to use.</p>
<p>A common way to accomplish this is to assign all users to different user groups and then control what user groups are allowed to view certain parts of your application.</p>
<p>The example I show here focuses only on controlling the &#8216;visible&#8217; property of a component and therefore only addresses what interface elements the user is allowed to see.  I plan to expand on this example in the future to also address the user&#8217;s ability to access specific sets of data.</p>
<p><span style="font-weight: bold;">Permit and PermitCondition Classes</span></p>
<p>In order to have a central repository of permissions and information on the current user I created a singlton class called Permit and another class called PermitCondition. Using a singlton ensures that only one instance of the class will be created and can still be easily accessible anywhere in your application.</p>
<p>The Permit class keeps information on the current user and is responsible for creating instances of the PermitCondition class.</p>
<p>Each instance of PermitCondition defines a single permission requirement for a single component by declaring if a specific user group is allowed to view the component or is explicitly blocked from viewing the component. Components can have multiple PermitConditions allowing for more complex permissions.</p>
<p><span style="font-weight: bold;">Summary of Example Application</p>
<p></span><span><a href="http://www.kerkness.ca/flexexamples/PermitExample/PermitExample.html">View the demo</a> : <a href="http://www.kerkness.ca/flexexamples/PermitExample/srcview/index.html">View demo source</a></span><span style="font-weight: bold;"><br /></span><br />In my example application I define permissions for 3 sample components in the main MXML application file.  I then use a LogIn component which sets the user&#8217;s group memberships.  Both the main MXML application and the LogIn component use the same singlton instance of the Permit class.</p>
<p>For the purpose of keeping this example simple my LogIn component manually sets users group permissions from a couple of simple functions. In a more complete application you would want your LogIn component to accept a username and password and define user groups after calling an HTTPService and likely querying a database.</p>
<p><span style="font-weight: bold;">Creating and Accessing the Permit Class</span></p>
<p>Use the following code to get access to the Permit singlton.
<pre>import claire.libs.Permit;private var appPermit:Permit = Permit.getInstance();</pre>
<p><span style="font-weight: bold;">Defining Component Permissions</span></p>
<p>Use the following code to define permissions for individual components
<pre>appPermit.applyPermit('adminaccess',Permit.ALLOW,'admin',box3);appPermit.applyPermit('adminaccess',Permit.BLOCK,'guest',box3);</pre>
<p>The applyPermit method accepts 4 properties
<pre>applyPermit( permitname:String, condition:String, group:String,component:UIComponent)</pre>
<ul>
<li><span style="font-style: italic;">permitname</span> : A unique identifier for the declared permit.</li>
<li><span style="font-style: italic;">condition:</span> Accepted values are Permit.ALLOW or Permit.BLOCK.  Determines if the supplied group name is granted or blocked access to component.</li>
<li><span style="font-style: italic;">group:</span> Name of a user group checked in the condition.</li>
<li><span style="font-style: italic;">component:</span> a UIComponent which the permit is applied against.</li>
</ul>
<p><span style="font-weight: bold;">Adding User Details to the Permit Class</span></p>
<p>Use the following code to add user details to the Permit class after successfully validating the user&#8217;s  username and password.
<pre>appPermit.loggedIn = true;appPermit.addGroup('guest') // Adds user to group 'guest'</pre>
<p>When a user is added to a group the Permit class will automatically check PermitConditions and update the visible property of components.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/control-access-to-flex-components-with-group-based-permissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex On Screen Qwerty Keyboard Component</title>
		<link>http://www.kerkness.ca/flex-on-screen-qwerty-keyboard-component/</link>
		<comments>http://www.kerkness.ca/flex-on-screen-qwerty-keyboard-component/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 01:30:00 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/blog/?p=16</guid>
		<description><![CDATA[NOTE:&#160; I&#8217;ve updated this component. To see the latest version click here.
One of the Flex applications I work on is a touch screen application primarily used to browse a product catalog. Because there is no keyboard physically attached to the touch screen display and it was necessary to have some input from users (primarily for [...]]]></description>
			<content:encoded><![CDATA[<p>NOTE:&nbsp; I&#8217;ve updated this component. To see the latest version <a href="http://kerkness.blogspot.com/2008/07/updated-flex-qwerty-component.html">click here</a>.</p>
<p>One of the Flex applications I work on is a touch screen application primarily used to browse a product catalog. Because there is no keyboard physically attached to the touch screen display and it was necessary to have some input from users (primarily for signing up to a mailing list) I built a Qwerty keyboard component for flex.</p>
<p>The component displays a nearly full set of keys found on your standard Qwerty keyboard with a limited set of special characters. You can assign TextInput and TextArea controls to accept the output from the component and there is a handy method for changing focus to different input fields.</p>
<p><a href="http://www.kerkness.ca/flexexamples/FlexQwerty/FlexQwerty.html">Click here to view the example application</a></p>
<p><a href="http://www.kerkness.ca/flexexamples/FlexQwerty/srcview/index.html">Click here to view source</a></p>
<p><span style="font-weight: bold;">Basic Usage</span></p>
<pre>&lt;mx:Form width="100%"&gt;
&lt;mx:FormItem label="Field 1" width="100%"&gt;
&lt;mx:TextInput id="field1" focusIn="myQwertyKeypad.newFocus(field1)" width="100%"/&gt;
&lt;/mx:FormItem&gt;
&lt;mx:FormItem label="Field 2" width="100%"&gt;
&lt;mx:TextInput id="field2" focusIn="myQwertyKeypad.newFocus(field2)" width="100%"/&gt;
&lt;/mx:FormItem&gt;
&lt;mx:FormItem label="Field 3" width="100%"&gt;
&lt;mx:TextInput id="field3" focusIn="myQwertyKeypad.newFocus(field3)" width="100%"/&gt;
&lt;/mx:FormItem&gt;
&lt;/mx:Form&gt;
&lt;claire:Qwerty id="myQwertyKeypad" inputControl="{field1}" width="100%"/&gt;</pre>
<p>While probably a pointless component for most Flex Applications this component is very handy for touch screen input requirements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/flex-on-screen-qwerty-keyboard-component/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>AlertTimer Flex Component</title>
		<link>http://www.kerkness.ca/alerttimer-flex-component/</link>
		<comments>http://www.kerkness.ca/alerttimer-flex-component/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 08:41:00 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/blog/?p=14</guid>
		<description><![CDATA[The Flex AlertTimer component displays a pop up alert window which automatically closes and displays a countdown timer to the user.
Click here to view an example(right click application to view source)
The alert can be called from a &#8217;show&#8217; method which accepts the following properties:

parent:DisplayObject  =  The component the alert displays over most likely [...]]]></description>
			<content:encoded><![CDATA[<p>The Flex AlertTimer component displays a pop up alert window which automatically closes and displays a countdown timer to the user.</p>
<p><a href="http://www.kerkness.ca/flexexamples/AlertTimer/AlertExample.html" target="_blank">Click here to view an example</a><br /><span style="font-size:85%;">(right click application to view source)</span></p>
<p>The alert can be called from a &#8217;show&#8217; method which accepts the following properties:
<ul>
<li>parent:DisplayObject  =  The component the alert displays over most likely the parent application</p>
</li>
<li>alertText:String = The message to display in the alert window
</li>
<li>alertTitle:String = The title of the alert popup
</li>
<li>modal:Boolean = If true the user will not be able to interact with the rest of the application until the alert closes</li>
</ul>
<p>Example usage
<pre>var myAlert:AlertTimer = new AlertTimer();myAlert.show(this, "my alert message", "my alert title", true);</pre>
<p>You can further customize the AlertTimer by setting more properties.
<pre>var myAlert:AlertTimer = new AlertTimer();myAlert.duration = 10;myAlert.buttonText = "Click here to close now";myAlert.alertWidth = 200;myAlert.counterText = "This window will self destruct in ";myAlert.show(this, "my alert message", "my alert title", true);</pre>
<p>While this component serves my purpose just fine it can certainly be expanded upon to include the full set of features available in a regular Flex Alert. For starters I&#8217;m pretty new to ActionScript and Flex so I wasn&#8217;t able to figure out how to actually extend the current Alert class. So instead I just created my own component and therefore their isn&#8217;t the ability to use multiple buttons like you can with an Alert. That said, if you were going to use multiple buttons you may not want to automatically close the alert on a timer. </p>
<p>I do realize that you can easily close a regular alert using the setTimeout() function and the PopUpManager, but then you can&#8217;t display a dynamic countdown which I think is more user friendly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/alerttimer-flex-component/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
