Cannot bind to a const for compile-time attributes
this is the error that comes, when we try to bind a public static const to a view state state name. When we use a flex 4 sdk.
A very nice explanation is given at https://bugs.adobe.com/jira/browse/SDK-17238
it seems its NAB (Not a Bug) but, a way to enforce Model - view - controller pattern more.
Read the detailed explanation in jira , interesting insight by Mario Juric at the end.
Monday, August 24, 2009
Friday, August 14, 2009
Alive PDF , Generating PDF from flex
Its been a long time , that I have posted anything on this blog.
Recently , while working on a design application, came across requirment which needed to generate a PDF from my flex application.
Was looking for a neat solution. As the technology is so much evolved , was hoping to find one, which does not include too much of sever side interaction , (using java tools like jasper and IText) .
And Alive PDF is the solution(http://alivepdf.bytearray.org/) . Very very nicely done.
It made the task too easy. It has multiple apis and a very good level of abstraction. Although its a open source, it does not require too much of digging in.
We can take the screen shot of any UI component in our application , convert it to image using any encoder (pngEncoder or jpegEncoder , which is now included in the graphics.codec package of mx in 3.2 sdk of flex) and the use the bytearray returned by these encoders to insert in pdf using "addImageStream" method of the PDF class.
here is how you can do,
1) add AlivePDF.swc from AlivePDF to build path of the flex project, or directly use source
2) var myPDF:PDF = new PDF( Orientation.PORTRAIT, Unit.MM, Size.A4 ); // can add multiple pages and also can clone pages.
3) there are apis to draw in pdf, write text in pdf.
and finally, save.
4) save can be done in AIR, by file class or use filereferance class to save on server.
5) if we are using flash player 10, filereferance can be used to save locally.
to use "save" method of filereferance class , do this:
use 3.2 sdk and write this in compiler option : -target-player = 10;
For more details visit : http://alivepdf.bytearray.org/ , they have good video tutorials and source file too
Was looking for a neat solution. As the technology is so much evolved , was hoping to find one, which does not include too much of sever side interaction , (using java tools like jasper and IText) .
And Alive PDF is the solution(http://alivepdf.bytearray.org/) . Very very nicely done.
It made the task too easy. It has multiple apis and a very good level of abstraction. Although its a open source, it does not require too much of digging in.
We can take the screen shot of any UI component in our application , convert it to image using any encoder (pngEncoder or jpegEncoder , which is now included in the graphics.codec package of mx in 3.2 sdk of flex) and the use the bytearray returned by these encoders to insert in pdf using "addImageStream" method of the PDF class.
here is how you can do,
1) add AlivePDF.swc from AlivePDF to build path of the flex project, or directly use source
2) var myPDF:PDF = new PDF( Orientation.PORTRAIT, Unit.MM, Size.A4 ); // can add multiple pages and also can clone pages.
3) there are apis to draw in pdf, write text in pdf.
and finally, save.
4) save can be done in AIR, by file class or use filereferance class to save on server.
5) if we are using flash player 10, filereferance can be used to save locally.
to use "save" method of filereferance class , do this:
use 3.2 sdk and write this in compiler option : -target-player = 10;
For more details visit : http://alivepdf.bytearray.org/ , they have good video tutorials and source file too
Friday, April 18, 2008
pruple trail Flex/air chat widget.
Please go to http://purpletrail.com and click on "hat with us Live " link on the top right corner ...
(Just to have to a look at the small component of entire desktop client)
Monday, March 10, 2008
Sunday, February 3, 2008
Subscribe to:
Posts (Atom)