<?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>BetaDesigns( Blog ) &#187; Bug Fixes</title>
	<atom:link href="http://www.betadesigns.co.uk/Blog/category/bug-fixes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.betadesigns.co.uk/Blog</link>
	<description>Flex and Component Development</description>
	<lastBuildDate>Sat, 31 Dec 2011 13:04:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Liquid-Photo Version 3.1.33 Submitted to AppWorld</title>
		<link>http://www.betadesigns.co.uk/Blog/2011/08/29/liquid-photo-version-3-1-33-submitted-to-appworld/</link>
		<comments>http://www.betadesigns.co.uk/Blog/2011/08/29/liquid-photo-version-3-1-33-submitted-to-appworld/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 21:27:38 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[liquid-photo]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://www.betadesigns.co.uk/Blog/?p=412</guid>
		<description><![CDATA[We have just submitted version 3.1.33 to the Blackberry AppWorld. This release addresses several issues that some of our users were experiencing and includes the following. *Fixed Bugs ** Image scanning now performed in the background so that users with large numbers of photos can still use the application without having to wait for all [...]]]></description>
			<content:encoded><![CDATA[<p>We have just submitted version 3.1.33 to the Blackberry AppWorld. This release addresses several issues that some of our users were experiencing and includes the following.</p>
<p>*Fixed Bugs<br />
** Image scanning now performed in the background so that users with large numbers of photos can still use the application without having to wait for all images to be found.<br />
** Increased small button hit areas to make them easier to select.</p>
<p>Please update if you have been having any issues.</p>
<p>Kind Regards<br />
The Liquid-photo team.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fwww.betadesigns.co.uk%2FBlog%2F%3Fp%3D412&count=horizontal&related=&text=Liquid-Photo%20Version%203.1.33%20Submitted%20to%20AppWorld' class='twitter-share-button' data-text='Liquid-Photo Version 3.1.33 Submitted to AppWorld' data-url='http://www.betadesigns.co.uk/Blog/?p=412' data-counturl='http://www.betadesigns.co.uk/Blog/2011/08/29/liquid-photo-version-3-1-33-submitted-to-appworld/' data-count='horizontal' data-via='Omnipitence'></a>]]></content:encoded>
			<wfw:commentRss>http://www.betadesigns.co.uk/Blog/2011/08/29/liquid-photo-version-3-1-33-submitted-to-appworld/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Liquid-Photo Version 3.1.32 Submitted to AppWorld</title>
		<link>http://www.betadesigns.co.uk/Blog/2011/08/28/liquid-photo-version-3-1-32-submitted-to-appworld/</link>
		<comments>http://www.betadesigns.co.uk/Blog/2011/08/28/liquid-photo-version-3-1-32-submitted-to-appworld/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 14:52:15 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[liquid-photo]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://www.betadesigns.co.uk/Blog/?p=407</guid>
		<description><![CDATA[We have just submitted version 3.1.32 to the Blackberry AppWorld. This release addresses several issues that some of our users were experiencing and includes the following. *Fixed Bugs ** Invalid images caused the application to crash this has now been fixed and the liquid-photo will now continue to load as well as alert the user [...]]]></description>
			<content:encoded><![CDATA[<p>We have just submitted version 3.1.32 to the Blackberry AppWorld. This release addresses several issues that some of our users were experiencing and includes the following.</p>
<p>*Fixed Bugs<br />
** Invalid images caused the application to crash this has now been fixed and the liquid-photo will now continue to load as well as alert the user about which images are corrupt.</p>
<p>Please update if you have been having any issues.</p>
<p>Kind Regards<br />
The Liquid-photo team.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fwww.betadesigns.co.uk%2FBlog%2F%3Fp%3D407&count=horizontal&related=&text=Liquid-Photo%20Version%203.1.32%20Submitted%20to%20AppWorld' class='twitter-share-button' data-text='Liquid-Photo Version 3.1.32 Submitted to AppWorld' data-url='http://www.betadesigns.co.uk/Blog/?p=407' data-counturl='http://www.betadesigns.co.uk/Blog/2011/08/28/liquid-photo-version-3-1-32-submitted-to-appworld/' data-count='horizontal' data-via='Omnipitence'></a>]]></content:encoded>
			<wfw:commentRss>http://www.betadesigns.co.uk/Blog/2011/08/28/liquid-photo-version-3-1-32-submitted-to-appworld/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unable to Catch IOErrorEvent&#8217;s when Loading a ByteArray into an Image</title>
		<link>http://www.betadesigns.co.uk/Blog/2009/03/18/unable-to-catch-ioerrorevents-when-loading-a-bytearray-into-an-image/</link>
		<comments>http://www.betadesigns.co.uk/Blog/2009/03/18/unable-to-catch-ioerrorevents-when-loading-a-bytearray-into-an-image/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 12:07:38 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[ByteArray]]></category>
		<category><![CDATA[Flex Bugs]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Image Control]]></category>
		<category><![CDATA[IOErrorEvent]]></category>
		<category><![CDATA[Unhandle IOErrorEvent]]></category>

		<guid isPermaLink="false">http://www.betadesigns.co.uk/Blog/?p=49</guid>
		<description><![CDATA[I was trying to load a byteArray into an image control today and would randomly get an Unhandled IOErrorEvent message. Now this shouldn't really happen as the image control uses a default broken image icon to display when there are any loading problems. Well after trying to catch the error unsuccessfully I wanted to know [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to load a byteArray into an image control today and would randomly get an Unhandled IOErrorEvent message. Now this shouldn't really happen as the image control uses a default broken image icon to display when there are any loading problems. Well after trying to catch the error unsuccessfully I wanted to know what was going on.<br />
So i went digging and i found in the base class of image, SWFLoader line 1497 the following <span id="more-49"></span></p>
<pre class="flex">&nbsp;
<span style="color: #5b7bff; font-weight: bold;">else</span> <span style="color: #5b7bff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>byteArray<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    loader = <span style="color: #5b7bff; font-weight: bold;">new</span> FlexLoader<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    child = loader;
    addChild<span style="color: #000000;">&#40;</span>child<span style="color: #000000;">&#41;</span>;
&nbsp;
    loader.<span style="color: #000000;">contentLoaderInfo</span>.<span style="color: #000000;">addEventListener</span><span style="color: #000000;">&#40;</span>
     <span style="color: #5b7bff; font-weight: bold;">Event</span>.<span style="color: #000000;">COMPLETE</span>, contentLoaderInfo_completeEventHandler<span style="color: #000000;">&#41;</span>;
    loader.<span style="color: #000000;">contentLoaderInfo</span>.<span style="color: #000000;">addEventListener</span><span style="color: #000000;">&#40;</span>
     <span style="color: #5b7bff; font-weight: bold;">Event</span>.<span style="color: #000000;">INIT</span>, contentLoaderInfo_initEventHandler<span style="color: #000000;">&#41;</span>;
    loader.<span style="color: #000000;">contentLoaderInfo</span>.<span style="color: #000000;">addEventListener</span><span style="color: #000000;">&#40;</span>
     <span style="color: #5b7bff; font-weight: bold;">Event</span>.<span style="color: #000000;">UNLOAD</span>, contentLoaderInfo_unloadEventHandler<span style="color: #000000;">&#41;</span>;
&nbsp;
    <span style="color: #009900; font-style: italic;">// if loaderContext null, it will use default, which is AppDomain</span>
    <span style="color: #009900; font-style: italic;">// of child of Loader's context</span>
    loader.<span style="color: #000000;">loadBytes</span><span style="color: #000000;">&#40;</span>byteArray, loaderContext<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
<p>You see the problem? No listener or dispatcher for the IOErrorEvent! So i had to load my bytes using FlexLoader(); and listen for the events myself.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fwww.betadesigns.co.uk%2FBlog%2F%3Fp%3D49&count=horizontal&related=&text=Unable%20to%20Catch%20IOErrorEvent%26%23039%3Bs%20when%20Loading%20a%20ByteArray%20into%20an%20Image%20' class='twitter-share-button' data-text='Unable to Catch IOErrorEvent&#039;s when Loading a ByteArray into an Image ' data-url='http://www.betadesigns.co.uk/Blog/?p=49' data-counturl='http://www.betadesigns.co.uk/Blog/2009/03/18/unable-to-catch-ioerrorevents-when-loading-a-bytearray-into-an-image/' data-count='horizontal' data-via='Omnipitence'></a>]]></content:encoded>
			<wfw:commentRss>http://www.betadesigns.co.uk/Blog/2009/03/18/unable-to-catch-ioerrorevents-when-loading-a-bytearray-into-an-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex Cookbook Recipe 5.8 Allow Certain items in a list to be selectable, Doesn&#8217;t quite work correctly</title>
		<link>http://www.betadesigns.co.uk/Blog/2009/03/12/flex-cookbook-recipe-58-allow-certain-items-in-a-list-to-be-selectable-doesnt-quite-work-correctly/</link>
		<comments>http://www.betadesigns.co.uk/Blog/2009/03/12/flex-cookbook-recipe-58-allow-certain-items-in-a-list-to-be-selectable-doesnt-quite-work-correctly/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 10:38:12 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[bugFixes]]></category>
		<category><![CDATA[finishKeySelection]]></category>
		<category><![CDATA[Flex Cookbook]]></category>
		<category><![CDATA[IListItemRenderer]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[listItems]]></category>
		<category><![CDATA[mouseEventToItemRenderer]]></category>
		<category><![CDATA[offScreenExtraRowsTop]]></category>

		<guid isPermaLink="false">http://www.betadesigns.co.uk/Blog/?p=48</guid>
		<description><![CDATA[Ok I needed to disable Heading elements inside a List Component in Flex, and i was being too lazy to work it out for myself so i picked up the Flex cookbook Adobe had been kind enough to send me and yes... It was there. Now the Mouse removal was straight forward and worked like [...]]]></description>
			<content:encoded><![CDATA[<p>Ok I needed to disable Heading elements inside a List Component in Flex, and i was being too lazy to work it out for myself so i picked up the Flex cookbook Adobe had been kind enough to send me and yes... It was there. Now the Mouse removal was straight forward and worked like a charm. But the keyboard events were a different story. The code didn't work for several reasons.<br />
1. Key directions were not being assigned.<br />
2. When a disabled item was at either the top or the bottom of the list it would stop you being able to continue down / up the list.<br />
To fix this i added the following code.<span id="more-48"></span></p>
<pre class="flex">&nbsp;
<span style="color: #3f5fc4; font-style: italic;">/**
* @inheritDoc.
* set our offscreen items to at least 4 so
* that if the last / first visible item
* is disabled we can still move the view
* up or down without getting stuck?
*/</span>
<span style="color: #5b7bff; font-weight: bold;">override</span> <span style="color: #5b7bff; font-weight: bold;">public</span> <span style="color: #009900; font-weight: bold;">function</span> initialize<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #5b7bff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
   <span style="color: #5b7bff; font-weight: bold;">super</span>.<span style="color: #000000;">initialize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span>;
   offscreenExtraRowsOrColumns =
   Math.<span style="color: #000000;">max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span>, offscreenExtraRowsOrColumns <span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #3f5fc4; font-style: italic;">/**
* @inheritDoc.
* capture key directions.
*/</span>
<span style="color: #5b7bff; font-weight: bold;">override</span> <span style="color: #5b7bff; font-weight: bold;">protected</span> <span style="color: #009900; font-weight: bold;">function</span> keyDownHandler<span style="color: #000000;">&#40;</span><span style="color: #5b7bff; font-weight: bold;">event</span>:KeyboardEvent<span style="color: #000000;">&#41;</span>:<span style="color: #5b7bff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
  <span style="color: #5b7bff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #5b7bff; font-weight: bold;">event</span>.<span style="color: #000000;">keyCode</span> == Keyboard.<span style="color: #000000;">UP</span> <span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
     _selectionIsAbove = <span style="color: #5b7bff; font-weight: bold;">true</span>;
&nbsp;
  <span style="color: #000000;">&#125;</span><span style="color: #5b7bff; font-weight: bold;">else</span> <span style="color: #5b7bff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #5b7bff; font-weight: bold;">event</span>.<span style="color: #000000;">keyCode</span> == Keyboard.<span style="color: #000000;">DOWN</span> <span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    _selectionIsAbove = <span style="color: #5b7bff; font-weight: bold;">false</span>;
  <span style="color: #000000;">&#125;</span>
    <span style="color: #5b7bff; font-weight: bold;">super</span>.<span style="color: #000000;">keyDownHandler</span><span style="color: #000000;">&#40;</span> <span style="color: #5b7bff; font-weight: bold;">event</span> <span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
<p>And then I changed the finishKeySelection( ) method as follows.</p>
<pre class="flex">&nbsp;
<span style="color: #3f5fc4; font-style: italic;">/**
* @inheritDoc.
* check to see if our selected item is
* allowed to be selected or not.
*/</span>
<span style="color: #5b7bff; font-weight: bold;">override</span> <span style="color: #5b7bff; font-weight: bold;">protected</span> <span style="color: #009900; font-weight: bold;">function</span> finishKeySelection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #5b7bff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
  <span style="color: #5b7bff; font-weight: bold;">super</span>.<span style="color: #000000;">finishKeySelection</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span>;
&nbsp;
  <span style="color: #b7cfe7; font-weight: bold;">var</span> i : int;
  <span style="color: #b7cfe7; font-weight: bold;">var</span> rowCount : int = listItems.<span style="color: #000000;">length</span>;
  <span style="color: #b7cfe7; font-weight: bold;">var</span> count : Number = <span style="color: #000000;">0</span>;
&nbsp;
  <span style="color: #b7cfe7; font-weight: bold;">var</span> item : IListItemRenderer = listItems<span style="color: #000000;">&#91;</span> caretIndex -
		verticalScrollPosition + offscreenExtraRowsTop <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#93;</span>;
&nbsp;
  <span style="color: #5b7bff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> item <span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    <span style="color: #5b7bff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> item.<span style="color: #000000;">data</span> <span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
      <span style="color: #5b7bff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> disabledFilterFunction<span style="color: #000000;">&#40;</span> item.<span style="color: #000000;">data</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>
      <span style="color: #000000;">&#123;</span>
	<span style="color: #009900; font-style: italic;">//trace( 'ITEM IS DISABLED : ' + disabledFilterFunction( item.data ) );</span>
	<span style="color: #009900; font-style: italic;">//trace( 'SELECTION IS ABOVE : ' + _selectionIsAbove );</span>
	<span style="color: #b7cfe7; font-weight: bold;">var</span> currIndex : int = caretIndex - verticalScrollPosition;
	<span style="color: #5b7bff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> _selectionIsAbove <span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
	  <span style="color: #009900; font-style: italic;">//LookUp</span>
	  i = currIndex + offscreenExtraRowsTop;
	  count = <span style="color: #000000;">0</span>;
	  while<span style="color: #000000;">&#40;</span> i &gt; <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>
	  <span style="color: #000000;">&#123;</span>
	    item = listItems<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#93;</span>;
	    <span style="color: #5b7bff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> !disabledFilterFunction<span style="color: #000000;">&#40;</span> item.<span style="color: #000000;">data</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>
	    <span style="color: #000000;">&#123;</span>
	      selectedIndex = selectedIndex + count;
	      <span style="color: #5b7bff; font-weight: bold;">return</span>;
	    <span style="color: #000000;">&#125;</span>
	      count --;
	      i--;
	    <span style="color: #000000;">&#125;</span>
	    selectedIndex = selectedIndex <span style="color: #000000;">+1</span>;
	    <span style="color: #009900; font-style: italic;">//trace( 'CANT GO UP ANYMORE' );</span>
	    <span style="color: #5b7bff; font-weight: bold;">return</span>;
&nbsp;
	    <span style="color: #000000;">&#125;</span><span style="color: #5b7bff; font-weight: bold;">else</span><span style="color: #000000;">&#123;</span>
	    <span style="color: #009900; font-style: italic;">//Look down.</span>
	    i = currIndex + offscreenExtraRowsTop;
	    count = <span style="color: #000000;">0</span>;
	    while<span style="color: #000000;">&#40;</span> i &lt; rowCount <span style="color: #000000;">&#41;</span>
	    <span style="color: #000000;">&#123;</span>
	      item = listItems<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#93;</span>;
	      <span style="color: #5b7bff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> !disabledFilterFunction<span style="color: #000000;">&#40;</span> item.<span style="color: #000000;">data</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>
	      <span style="color: #000000;">&#123;</span>
		selectedIndex = selectedIndex + count;
		<span style="color: #5b7bff; font-weight: bold;">return</span>;
	      <span style="color: #000000;">&#125;</span>
	      count ++;
	      i++;
	    <span style="color: #000000;">&#125;</span>
&nbsp;
	    selectedIndex = selectedIndex <span style="color: #000000;">-1</span>;
	    <span style="color: #009900; font-style: italic;">//trace( 'CANT GO DOWN ANYMORE' );</span>
	    <span style="color: #5b7bff; font-weight: bold;">return</span>;
        <span style="color: #000000;">&#125;</span>
      <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
<p>I dont know if this will help anyone but im sure glad i got it working.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fwww.betadesigns.co.uk%2FBlog%2F%3Fp%3D48&count=horizontal&related=&text=Flex%20Cookbook%20Recipe%205.8%20Allow%20Certain%20items%20in%20a%20list%20to%20be%20selectable%2C%20Doesn%26%23039%3Bt%20quite%20work%20correctly' class='twitter-share-button' data-text='Flex Cookbook Recipe 5.8 Allow Certain items in a list to be selectable, Doesn&#039;t quite work correctly' data-url='http://www.betadesigns.co.uk/Blog/?p=48' data-counturl='http://www.betadesigns.co.uk/Blog/2009/03/12/flex-cookbook-recipe-58-allow-certain-items-in-a-list-to-be-selectable-doesnt-quite-work-correctly/' data-count='horizontal' data-via='Omnipitence'></a>]]></content:encoded>
			<wfw:commentRss>http://www.betadesigns.co.uk/Blog/2009/03/12/flex-cookbook-recipe-58-allow-certain-items-in-a-list-to-be-selectable-doesnt-quite-work-correctly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Salesforce ActionScript Fun</title>
		<link>http://www.betadesigns.co.uk/Blog/2009/03/05/salesforce-actionscript-fun/</link>
		<comments>http://www.betadesigns.co.uk/Blog/2009/03/05/salesforce-actionscript-fun/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 15:41:05 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[faultstring	"INVALID_LOGIN: Invalid username]]></category>
		<category><![CDATA[flexkit]]></category>
		<category><![CDATA[loggin]]></category>
		<category><![CDATA[login errors]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[security token; or user locked out."]]></category>

		<guid isPermaLink="false">http://www.betadesigns.co.uk/Blog/?p=46</guid>
		<description><![CDATA[Ok I have been working with the salesforce API for a couple of days now and I have found it very interesting. However I have found a few things that don't seem to be very clear when trying to simply login to your account from an application that is running outside of the salesforce Sandbox. [...]]]></description>
			<content:encoded><![CDATA[<p>Ok I have been working with the salesforce API for a couple of days now and I have found it very interesting. However I have found a few things that don't seem to be very clear when trying to simply login to your account from an application that is running outside of the salesforce Sandbox.<br />
So as i have seen a lot of posts about this i have decided to explain how i go about logging in here.</p>
<p>1. To login you need 3 things<br />
1. Username in the form user@user.com<br />
2. Password.<br />
3. Security Token<br />
To get the security token for a user go to setup&gt;Reset your security token. This will then be emailed to you.</p>
<p>Logging into an Administrators account seems to be different than logging into a normal users account.<br />
For Administrators you have to set the protocol to 'http' for normal users set it to 'https' in addition we have to add the token to the password as follows.</p>
<pre class="flex">&nbsp;
<span style="color: #5b7bff; font-weight: bold;">private</span> <span style="color: #b7cfe7; font-weight: bold;">var</span> _conn : Connection = <span style="color: #5b7bff; font-weight: bold;">new</span> Connection<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #5b7bff; font-weight: bold;">private</span> <span style="color: #009900; font-weight: bold;">function</span> login<span style="color: #000000;">&#40;</span> username : String, password : String,
           token : String, isAdmin : Boolean = <span style="color: #5b7bff; font-weight: bold;">false</span> <span style="color: #000000;">&#41;</span> : <span style="color: #5b7bff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
    _connection.<span style="color: #000000;">protocol</span> = isAdmin ? <span style="color: #ff0000;">'http'</span> : <span style="color: #ff0000;">'https'</span>;
    <span style="color: #b7cfe7; font-weight: bold;">var</span> login : LoginRequest = <span style="color: #5b7bff; font-weight: bold;">new</span> LoginRequest<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span>;
	  login.<span style="color: #000000;">username</span> = value..<span style="color: #000000;">username</span>;
	  login.<span style="color: #000000;">password</span> = value..<span style="color: #000000;">password</span>.<span style="color: #000000;">toString</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span>
                                    + value..<span style="color: #000000;">token</span>.<span style="color: #000000;">toString</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span>;
	  login.<span style="color: #000000;">callback</span> = <span style="color: #5b7bff; font-weight: bold;">new</span> Responder<span style="color: #000000;">&#40;</span> loginResult, loginFault <span style="color: #000000;">&#41;</span>;
	 _connection.<span style="color: #000000;">login</span><span style="color: #000000;">&#40;</span> login <span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
<a href='http://twitter.com/share?url=http%3A%2F%2Fwww.betadesigns.co.uk%2FBlog%2F%3Fp%3D46&count=horizontal&related=&text=Salesforce%20ActionScript%20Fun' class='twitter-share-button' data-text='Salesforce ActionScript Fun' data-url='http://www.betadesigns.co.uk/Blog/?p=46' data-counturl='http://www.betadesigns.co.uk/Blog/2009/03/05/salesforce-actionscript-fun/' data-count='horizontal' data-via='Omnipitence'></a>]]></content:encoded>
			<wfw:commentRss>http://www.betadesigns.co.uk/Blog/2009/03/05/salesforce-actionscript-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Application Version Control in AS3</title>
		<link>http://www.betadesigns.co.uk/Blog/2008/06/24/application-version-control-in-as3/</link>
		<comments>http://www.betadesigns.co.uk/Blog/2008/06/24/application-version-control-in-as3/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 01:23:46 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Japanese]]></category>
		<category><![CDATA[.properties files]]></category>
		<category><![CDATA[Actionscript version control]]></category>
		<category><![CDATA[application version control]]></category>
		<category><![CDATA[ContextMenuItem]]></category>
		<category><![CDATA[custom context menu]]></category>
		<category><![CDATA[flash.events.ContextMenuEvent;]]></category>
		<category><![CDATA[flash.ui.ContextMenu]]></category>
		<category><![CDATA[flash.ui.ContextMenuItem;]]></category>
		<category><![CDATA[Flex application version control]]></category>
		<category><![CDATA[mx.resources.ResourceBundle;]]></category>
		<category><![CDATA[resource bundles]]></category>
		<category><![CDATA[ResourceBundles in Flex]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.betadesigns.co.uk/Blog/?p=22</guid>
		<description><![CDATA[I thought that I would just write a quick note on how I know which version of an application I am looking at when it has been published to the web. It's all well and good saying its revision 87 from svn but how do you know? Well a simple way is to add it [...]]]></description>
			<content:encoded><![CDATA[<p>I thought that I would just write a quick note on how I know which version of an application I am looking at when it has been published to the web. It's all well and good saying its revision 87 from svn but how do you know? Well a simple way is to add it to the Flashplayers custom context menu. Right click to see the custom menu and to view the source
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_CCPicker_898213180"
			class="flashmovie"
			width="200"
			height="100">
	<param name="movie" value="/Examples/VersionControl/CCPicker.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/Examples/VersionControl/CCPicker.swf"
			name="fm_CCPicker_898213180"
			width="200"
			height="100">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><span id="more-22"></span></p>
<p>This comprises of making just two files one of which is a singleton class that can be used for every project  you want to add version control to and the second is a VersionControl.properties file which you update before you publish a new version of your application lets take a look at that file first</p>
<pre class="flex"><span style="color: #009900; font-style: italic;">#Each item takes the same params as the ContextMenuItem class</span>
<span style="color: #009900; font-style: italic;">#and is seperated by and &amp;amp; ampersand</span>
<span style="color: #009900; font-style: italic;">#caption:String = caption Value : String,</span>
<span style="color: #009900; font-style: italic;">#separatorBefore:Boolean = false,</span>
<span style="color: #009900; font-style: italic;">#enabled:Boolean = true,</span>
<span style="color: #009900; font-style: italic;">#visible:Boolean = true</span>
<span style="color: #009900; font-style: italic;">#In addition each item supports a url variable just add</span>
<span style="color: #009900; font-style: italic;">#&amp;amp;YOUR URL GOES HERE;</span>
Version=Version <span style="color: #000000;">0.1</span>&amp;amp;false&amp;amp;false&amp;amp;true;
url=Developer:A McCormick&amp;amp;false&amp;amp;true&amp;amp;true&amp;amp;www.<span style="color: #000000;">goeshere</span>.<span style="color: #000000;">com</span>
viewSource=ViewSource&amp;amp;false&amp;amp;true&amp;amp;true&amp;amp;www.<span style="color: #000000;">goeshere</span>.<span style="color: #000000;">com</span></pre>
<p>The Second class controls what these properties do i know its a long class but its fully commented. ( right click the grey square above and choose view source to see the VersionController class ).<br />
Basically it loops through the VersionControl.properties file and builds context menu items based on the values, adding the ability to include links as well.<br />
And finally all you have to do is call getInstance( this ); in your main application file.</p>
<pre class="flex">&lt;!--<span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
&nbsp;
			<span style="color: #5b7bff; font-weight: bold;">import</span> VersionControl.<span style="color: #000000;">VersionController</span>;
&nbsp;
		<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span>--&gt;</pre>
<a href='http://twitter.com/share?url=http%3A%2F%2Fwww.betadesigns.co.uk%2FBlog%2F%3Fp%3D22&count=horizontal&related=&text=Application%20Version%20Control%20in%20AS3' class='twitter-share-button' data-text='Application Version Control in AS3' data-url='http://www.betadesigns.co.uk/Blog/?p=22' data-counturl='http://www.betadesigns.co.uk/Blog/2008/06/24/application-version-control-in-as3/' data-count='horizontal' data-via='Omnipitence'></a>]]></content:encoded>
			<wfw:commentRss>http://www.betadesigns.co.uk/Blog/2008/06/24/application-version-control-in-as3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>*.CSS files are Whitespaces Sensitive</title>
		<link>http://www.betadesigns.co.uk/Blog/2008/06/19/css-files-are-whitespaces-sensitive/</link>
		<comments>http://www.betadesigns.co.uk/Blog/2008/06/19/css-files-are-whitespaces-sensitive/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 13:28:59 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[stylesheets]]></category>
		<category><![CDATA[whitespaces]]></category>

		<guid isPermaLink="false">http://www.betadesigns.co.uk/Blog/?p=20</guid>
		<description><![CDATA[Just a quick note to say that if your stylesheets don't seem to be applied correctly Styles in a .css file are white space sensitive so if you place text-align: left it works but if you place text-align : left it breaks the css as it thinks that the tags name is text-align : ( [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note to say that if your stylesheets don't seem to be applied correctly<br />
Styles in a .css file are white space sensitive so if you place text-align: left it works but if you place text-align : left it breaks the css as it thinks that the tags name is text-align : ( inclusive of the final space between the last letter and the : ) !! </p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fwww.betadesigns.co.uk%2FBlog%2F%3Fp%3D20&count=horizontal&related=&text=%2A.CSS%20files%20are%20Whitespaces%20Sensitive' class='twitter-share-button' data-text='*.CSS files are Whitespaces Sensitive' data-url='http://www.betadesigns.co.uk/Blog/?p=20' data-counturl='http://www.betadesigns.co.uk/Blog/2008/06/19/css-files-are-whitespaces-sensitive/' data-count='horizontal' data-via='Omnipitence'></a>]]></content:encoded>
			<wfw:commentRss>http://www.betadesigns.co.uk/Blog/2008/06/19/css-files-are-whitespaces-sensitive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Profiler Problems in Flex!</title>
		<link>http://www.betadesigns.co.uk/Blog/2008/06/19/profiler-problems-in-flex/</link>
		<comments>http://www.betadesigns.co.uk/Blog/2008/06/19/profiler-problems-in-flex/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 23:44:24 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Profiler]]></category>
		<category><![CDATA[Flex Profiler No activity 60 seconds after connection.]]></category>
		<category><![CDATA[http://bugs.adobe.com/jira/browse/FB-12869]]></category>
		<category><![CDATA[InsideRIA]]></category>
		<category><![CDATA[mm.cfg]]></category>
		<category><![CDATA[PreloadSWF]]></category>
		<category><![CDATA[ProfilerAgent.swf]]></category>
		<category><![CDATA[Socket closed.]]></category>
		<category><![CDATA[Training from the Source : Profiling Flex Applications]]></category>
		<category><![CDATA[workspace/.metadata/.plugins/com.adobe.flash.profiler/a]]></category>

		<guid isPermaLink="false">http://www.betadesigns.co.uk/Blog/?p=19</guid>
		<description><![CDATA[After reading an example chapter from Training from the Source : Profiling Flex Applications on InsideRIA I thought ooo! I like using the profiler but i didnt know you could do that! So away I went and opend up one of my apps and clicked Profile.... O no whats going on? No Profiler prompt just [...]]]></description>
			<content:encoded><![CDATA[<p>After reading an example chapter from <a title="Profiler article" href="http://www.insideria.com/2008/06/profiling-flex-applications-sa.html" target="_blank">Training from the Source : Profiling Flex Applications</a> on InsideRIA I thought ooo! I like using the profiler but i didnt know you could do that! So away I went and opend up one of my apps and clicked Profile.... O no whats going on? No Profiler prompt just straight into the application</p>
<p>Socket closed.<br />
Socket closed.<br />
Socket closed.<br />
Flex Profiler No activity 60 seconds after connection.</p>
<p>and then quiet<span id="more-19"></span></p>
<p>I was at a loss why had my Profiler failed me? Could I find a solution on the internet by no means so i decided to carry on with some work and tackle this at a later date but then...</p>
<p>My apps start to take a rather long time to startup and even worse NO BREAKPOINTS !! O my god im gonna have a heart attack!</p>
<p>I noticed in the console that Flex is tracing out</p>
<p>Users/Anthony/workspace/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf</p>
<p>before trying to run my apps I do a search and found this <a title="bug" href="http://bugs.adobe.com/jira/browse/FB-12869" target="_blank">bug </a>in the bugbase</p>
<p><a title="bug" href="http://bugs.adobe.com/jira/browse/FB-12869" target="_blank">http://bugs.adobe.com/jira/browse/FB-12869</a></p>
<p>it mentions a file called mm.cfg that points to this ProfilerAgent.swf</p>
<p>you can find this file in the following locations</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th width="201">Operating system</th>
<th width="314">mm.cfg file in this directory</th>
</tr>
<tr>
<td>Macintosh OS X</td>
<td>MacHD:Library:Application Support:macromedia:</td>
</tr>
<tr>
<td>Microsoft Windows Vista</td>
<td>C:\Users\<em>user_name</em>\</td>
</tr>
<tr>
<td>Microsoft Windows 2000/XP</td>
<td>C:\Documents and Settings\<em>user_name</em>\</td>
</tr>
<tr>
<td>Microsoft Windows 95/98/ME</td>
<td>%HOMEDRIVE%\%HOMEPATH%\</td>
</tr>
<tr>
<td>Linux</td>
<td>/home/<em>user_name</em></td>
</tr>
</tbody>
</table>
<p>inside this file there is a line of code that reads</p>
<p>PreloadSwf=/Users/[username]/Documents/workspace/<br />
.metadata/.plugins/com.adobe.flash.profiler/<br />
ProfilerAgent.swf?host=localhost&amp;port=9999</p>
<p>delete this and the debugger starts to work again however my Profiler still doesnt...</p>
<p>usefull related blog post</p>
<p><a title="fingers dancing" href="http://www.fingersdancing.net/2008/06/flex-debugger-crashing-eclipse-safari.html" target="_blank">Fingers Dancing</a></p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fwww.betadesigns.co.uk%2FBlog%2F%3Fp%3D19&count=horizontal&related=&text=Profiler%20Problems%20in%20Flex%21' class='twitter-share-button' data-text='Profiler Problems in Flex!' data-url='http://www.betadesigns.co.uk/Blog/?p=19' data-counturl='http://www.betadesigns.co.uk/Blog/2008/06/19/profiler-problems-in-flex/' data-count='horizontal' data-via='Omnipitence'></a>]]></content:encoded>
			<wfw:commentRss>http://www.betadesigns.co.uk/Blog/2008/06/19/profiler-problems-in-flex/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

