Flex 4: pass MXML application components reference to external classes

Using Flash Builder (Flex 4 SDK) I want to controll my application in an external class, just to make code more organized.

I want to access a button (or any other component)  and change its enabled status to disable, for example.

My application MXML looks like

[code="xml"]

<?xml version="1.0"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark">

<s:layout>
<s:BasicLayout/>
</s:layout>

<fx:Script>
<![CDATA[
import myClass;
protected function myButton_clickHandler(event:MouseEvent):void
{
myClass.myFunction(this);
}
]]>
</fx:Script>

<s:Button id="myButton" label="Click Me"
click="myButton_clickHandler(event)"/>
</s:Application>

[code]

and my external class looks like:

[code="as3"]

public class myClass
{
public static function myFunction(application:Object):void{

// disable the button
application.myButton.enabled = false;
}
}

[code]

this way you can access all the components of your mxml application.

CSS 960gs; Centering a complex design

http://hicksdesign.co.uk/journal/how-to-vertical-centering-with-css

MySQL data types best practices

Database design : what is the best data type should I use for different sorts of data?

you got to check this links;

http://www.slideshare.net/ronaldbradford/top-20-design-tips-for-mysql-data-architects-presentation

http://www.wsi-ebizsolutions.biz/blog/optimal-mysql-data-types/2010/01/

http://www.developwebsites.net/choose-optimal-mysql-data-type/

http://help.scibit.com/Mascon/masconMySQL_Field_Types.html

http://articles.techrepublic.com.com/5100-10878_11-5980073.html

German Reflexive Verbs (ex. Enjoy yourself!)

Although English does have some reflexive verbs forms (“enjoy yourself”), German relies much more on the reflexive than English does. The grammatical term reflexive simply means that a verb’s subject (the initiator of an action) is the same person as that verb’s object (the person acted upon). The object “reflects” back to, or is a “reflection” of the subject. “We are enjoying ourselves” is a reflexive phrase. “We are enjoying them” is not—because the subject (we) is not the same person as the object (them). The word “reflexive” means the same thing in English and German grammar, but as we said, German uses reflexive verbs much more frequently.

The Four German Cases; Nominative, Accusative, Dative, and Genitive

When to Use Them?

German cases are four: the nominative case (subject of the sentence); the accusative case (the direct object); the dative case (the indirect object), and the genitive case (possessive).
Cases are not something strange to English, pronouns for example use a certain kind of cases, for example we say “he speaks”, and “give him” and not “give he”, did you see how “he” became “him” in the second example, well the same thing happens in German, the only difference is that in German it’s much more widely used, not only in pronouns, even nouns/ adjectives/ articles … use the same thing. The German case indicates the role of an element in a sentence Read the rest of this entry »

How to guess; Der, Die or Das?

Introduction

Most world languages have nouns that are either masculine or feminine. German, besides capitalizing  all nouns, goes them one better and adds a third gender: neuter. The masculine definite article (“the”) is der, feminine is die, and neuter is das. German-speakers just seem to know whether Wagen  (car) is der or die or das. (It’s der Wagen.) And they also know that the other German word for car is das Auto. But when referring to cars by brand name, it’s always der Ford, der VW or der Mercedes. Read the rest of this entry »

2 . Zu Hause

1 E. Lebensformen

Life form

Wortschatz (Vocabulary)

  • die allein erziehende Mutter (the single mother)
  • Erdgeschoss (Ground floor)
  • wahrscheinlich (Probably )
  • Dachwohnung (Attic : roof of a house)
  • im dritten Stock (On the third floor)
  • weil die Großmutter mit eingezogen ist (Because the grandmother moved in with)
  • Er nicht viel Besuch bekommt ( He does not get many visitors)
  • Weil sie von ihrem Mann getrennt lebt (Because she lives separately from her husband)
Niece

1 D. Familie und Verwandtschaft

Family and relatives

  • Bob, hast du Geschwister ?
  • Ja, ich habe drei Brüder und zwei Schwestern. Und du?
  • Ich habe nur einen Bruder. Und hast du eine Schwägerin?
  • Ja, zwei. Nur zwei Brüder sind verheiratet.
  • Wie viele Enkelkinder hast du?

Wortschatz (Vocabulary)

  • Großvater /  Opa, Großmutter / Oma
  • Eltern (parents)
  • Vater
  • Mutter
  • Tante, Tanten (aunts)
  • Schwager (Brother-in-law), Schwägerin, Schwiegervater
  • Schwester, Geschwister (Siblings)
  • Cousine
  • Enkelkind (Grandchild)
  • Nichte (Niece)
  • Neffe (Nephew)
Niece

1 C. Aber ich habe fast das Flugzeug verpasst!

How to build the past, verb ending and format

Die Regeln
———————————-

# There’s no rule, but there’s seven possible endings:

be…t –> bestellt

be…en –> bekommen

er…t –> erklärt

er…en –> erhalten

ver…t –> verdient

ver…en –> verboten

…iert –> diskutiert

———————————-