Blogadda

Blogadda
Visit BlogAdda.com to discover Indian blogs

Monday, January 18, 2010

Two-way data binding-- By Eugene Kardash

Two-way data binding, aka bidirectional data binding, refers to two components acting as the source object for the destination properties of each other. I.e. if you have a variable defined, and a, let say, input field with this variable bound to text property of the field, when you change the field's text the variable is changed, and when you change the variable, the field's text property is changed. In Flex 3 this is possible using a combination of curly braces and statement. Below is the simple example illustrating this:
01.xml version="1.0" encoding="utf-8"?>
02.<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1024" minHeight="768">
03.
04. <mx:String id="myName"/>
05. <mx:Binding source="nameInput.text" destination="myName" />
06.
07. <mx:TextInput id="nameInput" x="30" y="28"/>
08. <mx:Label x="31" y="68" text="{myName}"/>
09.
10.mx:Application>


In Flex 4 this can be archived much easier, inline using declaration: @{bindable_property}. Code example:


01.xml version="1.0" encoding="utf-8"?>
02.<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
04. xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
05. <fx:Declarations>
06. <fx:String id="myName"/>
07. fx:Declarations>
08.
09. <s:VGroup width="200" height="67" x="37" y="38">
10. <s:TextInput id="nameInput" text="@{myName}"/>
11. <mx:Spacer height="10"/>
12. <s:SimpleText text="{myName}"/>
13. s:VGroup>
14.
15.s:Application>

Monday, January 4, 2010

Rahat Indori Sahab

dhuup samandar chehraa hai
manzar kitnaa gahraa hai

dekh chale ham saaraa shah’r
acchaa Khaasaa sehraa hai

merii aaNkhoN se dekho
vo chehraa hii chehraa hai

gandum sab zahriile haiN
zaahir khet sun-haraa hai

rone par hii qaid nahiiN
haNsne par bhii pahraa hai

apnii bayaaz-e-hastii meN
har misraa be-bahraa hai

dariyaa dariyaa chhaan chuke
saahil sab se gahraa hai

donoN dost haiN barsoN se
maiN guuNgaa, vo bahraa hai

Saturday, January 2, 2010

LETTER

LETTER

A Desi chap was deeply in love with a pretty girl, whom he wanted. But he did not have the courage to talk to her in person.

So he decided to go alone and with the help of a dictionary, he wrote a letter of proposal to her.


HE WROTE :

Most worthy of your estimation after a long consideration and much mediation, I have a strong indication to become your relation.


As to my educational qualification, it is no exaggeration or fabrication, that I have passed my matriculation examination (no doubt without any hesitation and very little preparation).

What do you say to the solemnization of our marriage celebration according to the glorification of modern civilization and with a view to the expansion of the population of present generation. On your approbation of the application,

I shall make preparation to improve my situation, and if such obligation is worthy of consideration it will be our argumentation of the joy and exaltation of our joint dissimilation.

Thanking you in anticipation and with devotion; To remain victim of your fascination.

SHE ANSWERED :

Dear Mr. Victim of my fascination,

Congratulation for your lengthy narration of course full of affection aimed at an affiliation for a combination which on examination I find is a fine presentation of your ambition.

You have passed your matriculation with little preparation, what about my graduation after a long botheration, so improve situation in education and make an application by acquisition of post graduation and minimumqualification for the convocation and before taking your photo for circulation undergo beautification.

Further strict observation of the following conditions is the regulation for the determination of our relation.

1. Consultation of my parents before approaching for my connection.

2. Communication of your confirmation that you are not a victim of any fascination and,

3. Procreation must not be your recreation.

In anticipation of a solid action instead of continuation of paper conversation.

I Remain, unaffected by your affection.