{ Don't Repeat Yourself ! }

Browsing Posts published in December, 2009

When working with databases one always need to keep track of  changes in the database structure.
If an older database needs to be updated to the latest version quite possible a lot of ALTER statements need to be created to make the old database look like the new one. Doing this manually often leads to issues, particularly if lots of changes were made.

A really cool and free tool to design and synchronize databases is Power Architect

It’s open source and java based. It can connect to multiple source databases concurrently and compare data models & database structures to identify discrepancies.

Just noticed that some of my image assets where missing in the release build folder after using the Flex Builder 3 “export release build” function.

Cause: Flex only copies those assets that are not embedded into the release folder

Problem: If the same asset is embedded in one place and just referenced by URL in another, the file is missing.

Solution: if embedding assets – embed them globally and make sure to only use the embedded assets in all components.

Problem: when setting the rotation property on a Flex label or text component the component becomes invisible.

Cause: To rotate text in Flex the font must be embedded.

Easy Solution:

1. Embed a system font in your Application like so:

[Embed(systemFont='Verdana',  fontName='myPlainFont',  mimeType='application/x-font' )]
private var font1:Class;

2. set the embedded font as font family for the text component you want to rotate, e.g:

l = new Label() ;
l.setStyle("fontFamily" ,"myPlainFont") ;

3.  set rotation ( e.g. l.rotation = 90 ) -  now the label should be rotated by 90 Degrees and visible.


Get Adobe Flash player