<< Chapter < Page Chapter >> Page >

More namespace attributes in the root element

If you compare Listing 2 with Listing 1, you will see that the namespace attributes in Listing 2 are different from those in Listing 1, and there aremore of them in Listing 2.

Listing 1 has only one namespace attribute while Listing 2 has three namespace attributes.

Mix or match Flex components

You can use Flash Builder 4 to create projects that

  • use Flex 3 exclusively
  • use Flex 4 exclusively
  • use a mixture of the two

Must specify compiler version for project

When you create a new project in Flash Builder 4, you must specify whether the project is to be compiled using the Flex 3 compiler or the Flex 4 compiler.

Different versions of the skeleton code

If you specify the Flex 3 compiler, the skeleton code will look like Listing 1 (with a couple of additional sizing attributes) . For that case, you must use Flex 3 components exclusively.

If you specify the Flex 4 compiler, the skeleton code will look like Listing 2. In that case, you can use Flex 3 components,Flex 4 components, or a mixture of the two.

What do these namespace attributes mean?

Building on what I explained earlier, the inclusion of the namespace attributes with the name "mx" in Listing 1 and Listing 2 means that all elements with names that refer to components from the Flex 3 library ofcomponents must be prefixed with "mx:" . (You will see examples of this in code fragments later in this lesson.)

The inclusion of the namespace attribute with the name "s" in Listing 2 means that all elements with names that refer to the new componentsfrom the Flex 4 library of components must be prefixed with "s:" . (You will also see examples of this in code fragments later in this lesson.)

Resolution of duplicate names

The Flex 3 library and the Flex 4 library contain many components with the same names, such as Label and Button . Therefore, the name of the component alone is not sufficient to identify which of twocomponents having the same name is to be used at a particular location in the program. The "mx:" prefix and the "s:" prefix are the mechanisms by which you identify the correct component to the compiler.

For those with knowledge of ActionScript or Java programming, this is analogous to using a package name to identify a class in those programminglanguages.

You can read more on the topic of required namespaces here .

The sample program named Namespace02

Figure 1 shows the output from the Flex 3 program named Namespace01 that I explained in the earlier lesson on this topic.

Output from namespace01.

Missing image.
Output from Namespace01.

Figure 2 shows the output from the Flex 4 program named Namespace02 that I will explain in this lesson.

Output from namespace02.

Missing image.
Output from Namespace02.

Mostly default look and feel

In both programs, the top portion of the output was purposely colored red and the bottom portion was purposely colored cyan. Otherwise, the colors, sizes,positions, and shapes of the components in both programs were allowed to take on defaultvalues.

The project tree for the project named Namespace02

Questions & Answers

what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
Maciej
characteristics of micro business
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
s. Reply
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
SUYASH Reply
for screen printed electrodes ?
SUYASH
What is lattice structure?
s. Reply
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!





Source:  OpenStax, Introduction to xml. OpenStax CNX. Dec 02, 2014 Download for free at https://legacy.cnx.org/content/col11207/1.18
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Introduction to xml' conversation and receive update notifications?

Ask