8
Jun/10
0

7 rules to work with highest performance in SQLite databases in Adobe AIR/Flex

This article shows 7 rules how to get out the most of your SQLite application in AIR:

  1. Create VO’s (value objects or classes) for each query extending a VO with contains at least the “ROWID”
  2. Always use SQLStatement.itemClass and to query for an object – it automatically casts the
  3. Use the “AS” alias in your SQL queries (e.g. SELECT count(name) AS “numberOfNames”) to fit it to your value object.
  4. Use SQLConnection.columnNameStyle = SQLColumnNameStyle.SHORT as possible.
  5. Try to avoid the same name in different tables (which has to be joined at one point)
  6. Use SQL transactions: Start with sqlConnection.begin(); continue with “INSERT INTO (‘firstName’) VALUES (‘:firstName’) and SQLStatement.parameters[':firstName'] = VOList[numberOfVO][firstName];  and end with SQLConnection.commit();
  7. If you want to get the current database Schema (‘SELECT * FROM sqlite_master WHERE type = “table”‘) open the database in read mode SQLConnection(_sqlFile, SQLMode.READ), load the Schema sqlConnection.loadSchema() and push SQLConnection.getSchemaResult() into an Array
3
Jun/10
0

NativeMenu and CMD-Backspace #AS3

If you are using var the NativeMenu on Mac and don’t know how to assign the backspace key, then you are here completely right.

This is how it works:

You just to set keyEquivalent = ‘\b’  (On German Keyboard: Alt Gr – Shift – 7)

Example:

menuItem:NativeMenuItem = nativeMenu.addItem(new NativeMenuItem(“MyMenuItem”));

menuItem.keyEquivalentModifiers = [Keyboard.COMMAND];

menuItem.keyEquivalent = ‘\b’;

menuItem.enabled = false;

menuItem.addEventListener(Event.SELECT, eventHandler);

26
May/10
0

Combine states and transitions #flex

The version of flex builder offers many new features.

One really useful combination is the combination of states and transition.

Comparing to the normal development process, complicated bit shifting for setting one pixel to another place – Flex shows how easy it could go:

CodeDependent – Flex 4 States and Transitions | Adobe TV

Tagged as: ,