Thursday, February 9, 2012

New Logo For Apache Flex

After what seemed like endless deliberations on the Flex Dev Mailing list, the team from Fuse Collective have published the new Apache Flex logo. I think they did a great job personally and many thanks to them for donating their time and efforts.

Check it out on Facebook or Google+.

While I'm on this subject, I would like to use the opportunity to urge other Flex developers to get involved with the Apache Flex and Spoon projects. To be honest, I'm just as upset as many of you are with the way that Adobe has handled anything Flash or Flex recently, but even if you have decided to move to another technology like HTML5, Java etc., things are being discussed and worked on that will interest you too (in terms of migration). We're all in the same boat, and there's no better time to pull together and pool our collective resources and ideas.

Friday, May 20, 2011

Apache/PHP Crash 3221225477

A friend of mine had problems recently running Apache, PHP and MYSQL on Windows Server 2003. The problems occurred using the community version of eGroupWare (a web based project manager), although we suspected that the issues weren't just limited to that product.

The problem was the now seemingly famous (if you Google it) Apache crash: Parent: child process exited with status 3221225477 -- Restarting. This problem is apparently an access violation.

If you have been unfortunate enough to experience this, and you have read the things about copying DLLs to the windows system32 folder (and maybe checked your PATH environmental variable before you did that!), you might want to read the following snippet from windows.php.net:

Windows users: please mind that we do no longer provide builds created with Visual Studio C++ 6. It is impossible to maintain a high quality and safe build of PHP for Windows using this unmaintained compiler.

For Apache SAPIs (php5_apache2_2.dll), be sure that you use a Visual Studio C++ 9 version of Apache. We recommend the Apache builds as provided by ApacheLounge.

We installed the 2.2.18 build from Apache Lounge, we installed the 5.3.6 build from windows.php.net - and the crashing has now stopped. Lovely Jubbly.

Friday, May 6, 2011

Flash Debugger Crash

UPDATE 20th May 2011.
I'm very happy to announce that this problem seems to have been fixed in the 10.3 version of the Flash Debug Player in Windows. I'm also happy to say that Adobe did indeed contact my colleague Alejandro today to ask us to check again or provide more details. Nice.
---------
Since Flex 4 and Flash Player 10 were published, we have been getting crashes when running the external debug Flash Player from FlashDevelop, somewhere after release 10.0.32. As workaround we just reverted back to the Flash Standalone Debug player that we knew worked, and carried on. Recently we wanted to move to Flex 4.5, and this became more of an issue as we need to now use the 10.2 player.

Originally we were pointing the finger at FlashDevelop (because of past posts etc. on this issue), but we have established that this is in fact a Flash Debugger Player bug and we know pretty much exactly how it happens. The fact that is has nothing to do with FlashDevelop.

If you are using resource bundles in Flex, and you have a file with keys and values that exceeds a point just over 12k, and you compile these files into the SWF using the locale=en_US (or = whatever) compiler option, this crash will start happening.

The workaround is to create a resource module swf of your resource files and load that at runtime, and then the crash stops (see this adobe article). Alternatively, you can break your resource bundle files up into less that 12k each. Please remember that this only seems to apply to the external debug player (projector).

We have registered this bug with Adobe - FP-6790 at https://bugs.adobe.com/flashplayer/, but because it relates to "a potential security issue", we couldn't see it or review it afterward!

Really hope this helps somebody with the same problem. This was true for Flex SDK 4.5 first release build and Flash Player Debugger (projector, sa_debug) 10.2 r159.

Saturday, November 6, 2010

DropDownList Memory Leak - Flex 4.1

There's a memory leak in the DropDownList in Flex 4.1 (build 4.1.0.16076). If you set the dataProvider you'll find you can't subsequently clear it from memory and it won't get garbage collected (and nor will the container etc. that houses it).

Adding the functions below provided us with a workaround (in MXML set "preinitialize" to the onPreInit function):

import flash.events.Event;

private function onPreInit():void
{
      addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
}

protected function onRemovedFromStage(event:Event):void
{
      removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
      this.dataProvider = null;
}

Saturday, September 25, 2010

MXDataGridItemRenderer Focus

Author's note - since writing this post I subsequently discovered the "editor" property which does exactly what my "focusChild" property does below. I've left the post intact anyway to help highlight the point and maybe also in the faint hope that somebody from the documentation team at Adobe sees this and does something wild like mentioning this property in their examples...

Once you have switched your existing Flex 3 projects over to trying to use the spark components in Flex 4 you will come across a problem with the new setup for DataGrid ItemRenderers. You will realise that things are now structured differently and you will need to use the MXDataGridItemRenderer class to get your item renderers working again.

You smile a wry smile and bite the bullet, but then something else happens. You realise that things have got all “out of focus”... And by that I mean that tab and mouse focusing doesn't work like they did in Flex 3, and the behaviour is not what you (or your users) would be expecting.

The good thing is the solution is ultimately pretty simple. The code below shows a sub-class of MXDataGridItenRenderer which you can use to get the old focus behaviour back to the way it was. What happens is MXDataGridItemRenderer itself receives the focus, but can't really do anything with it, so you yourself get the job of passing it on to your TexInput, DropDownList, whatever. The way we did it was to add a property called focusChild to our sub-class, as the itemRenderer could conceivably contain any number of custom controls, and this helps to stipulate which one gets the focus when the user mouse-clicks or tabs into the renderer for the given column on the DataGrid.

Our team on the job generally subclass this class, and use the creationComplete event to set the focusChild property to the custom control. The accessors on Data and ListData are there for convenience so that these can be accessed by a subclass (in Flex 3 this complied with the interfaces for IDataRenderer and IListItemRenderer). We also generally override the set data method for setting custom properties on a custom control.



<s:MXDataGridItemRenderer
fx="http://ns.adobe.com/mxml/2009"
mx="library://ns.adobe.com/flex/mx"
s="library://ns.adobe.com/flex/spark"
focusin="gotFocus(event)"
focusenabled="true"
implements="mx.managers.IFocusManagerComponent">
<fx:script>
<!--[CDATA[

import mx.controls.dataGridClasses.DataGridListData;
import mx.controls.listClasses.BaseListData;
import flash.events.Event;
import mx.managers.IFocusManagerComponent;

protected var _listData:DataGridListData;
protected var focusChild:IFocusManagerComponent;

private function gotFocus(event:Event):void
{
if (focusChild)
{
focusChild.setFocus();
}
}
override public function set data(value:Object):void
{
super.data = value;
}
public override function get data():Object
{
return super.data;
}
override public function get listData():BaseListData
{
return _listData;
}
override public function set listData(value:BaseListData):void
{
_listData = DataGridListData(value);
}
]]-->

</fx:script>
</s:MXDataGridItemRenderer>


Tuesday, March 9, 2010

Air 2 Native Process Command Window Pop-up

Further to an earlier post, I just wanted to note that Adobe have now said they will stop the command window appearing by default on native processes run on Windows when they do the full release of Air 2 (see my post from January 2010 on Air 2 Beta Native Process).

Chris Thilgen from Adobe apparently pushed for this (see his comments on the adobe forum), so if you ever read this Chris, thanks for that.

Saturday, March 6, 2010

Don't try this at home

All people in this video will remain anonymous - its not me by the way - its the future president of FIFA.