Wednesday, May 12, 2010

Create/Register Mediator for Runtime created UIComponent Like adding into Pop up - PureMVC

Hi Friends,

Here I am again Puting accross point where I thought for second.
The solution for registering mediator for component in popup created at run time is below.

reportPopup = PopUpManager.createPopUp(this.payrollModule,PdfReportFrame,true) as PdfReportFrame;
registerMediator(new PdfReportFrameMediator(reportPopup)); //this without resolving component on parent
PopUpManager.centerPopUp(reportPopup);


Every thing else goes same way.


Ranjit

Type 1086: Syntax error: expecting semicolon before minus. Flex Problem - IFRAME expecting semicolon before minus

Flex Builder is throwing an "expecting semicolon before minus" error on the XML declaration!!

This is due to Package Name have "-" symbol. Would be great if Flex builder show approriate file.

:-) Helped me. Hope it helps some body.

Ranjit

Tuesday, May 11, 2010

Flex Java Springs BlazeDS integration

Flex Java Springs Overview

spell checker in flex 3 / Flash / Action Script 3

Hi All,

Had tried using many spell checkers for Flash UIComponents but none of them work.

Fortunatly there was one it self from Adobe Open Source (Adobe Labs) Squiggly

Which does all which is needed. but there are some loop holes and you have to handle garbage collection your own way or else client system will stole, take 50% of CPU memory..

So if your useing squigly for large project which involve Runtime genration of UI component make sure it has been disabled after use.

Hope this helps.

Ranjit

Monday, May 10, 2010

GraniteDS

Worth looking at as a alternative for LifecycleDS.

GraniteDS

flash 10 security issue filereference workaround example

Upload and download require user interaction
In Flash Player 9, ActionScript could perform uploads and downloads at
any time. With Flash Player 10, the FileReference.browse and
FileReference.download operations may be initiated only through
ActionScript that originates from user interaction. This includes
actions such as clicking the mouse or pressing the keyboard.
What is impacted?
This change can potentially affect any SWF file that makes use of
Filereference.browse or FileReference.download. This change affects
SWF files of all versions played in Flash Player 10 beta and later.
This change affects all non-app content in Adobe AIR (however, AIR app
content itself is unaffected).
What do I need to do?
Any existing content that invokes a browse dialog box using
Filereference.browse or FileReference.download outside of an event
triggered by user interaction will need to be updated. The dialog box
will now have to be invoked through a button, keyboard shortcut, or
some other event initiated by the user.

Solution

try{
var urlReq:URLRequest = new URLRequest(“http://www.myUrl.com/file”);
fileReference.download(urlReq);
}

catch(error:Error)
{
Flash10Workround();

}

WorkAround Method :

var popup:Somepopupcustomobject;

private function Flash10Workround():void
{
popup= new Somepopupcustomobject();
PopUpManager.addPopUp(popup,this,true);
PopUpManager.centerPopUp(popup);
popup.LABEL=”File is Ready to Exported, Please Click Ok to continue”;
popup.submitSub.addEventListener(MouseEvent.CLICK, closePopUp);
}

private function closePopUp(e:MouseEvent):void
{
var urlReq:URLRequest = new URLRequest(“Ur Link here”);
fileReference.download(urlReq);
PopUpManager.removePopUp(Object218PopUp);

}

Regards,
Ranjit Sail

chm To .pdf Converter

Well I Was thinking of reading mysql 5.0 certification Guide and came across the this .chm extension which not user friendly i feel , so was looking out for ways of puting it in pdf format, well you google it out chmtopdf pilot Click Here was there, it adds some text on top of the page but its fine till u want to have better user experiance.

well Let me know if you know better tool for the same.