Abdul,
Thank you very much for the explanation and that make sense to me.
Thanks!
Hari
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Abdul Qabiz
Sent: Friday, June 24, 2005 3:48 PM
To: [email protected]
Subject: RE: [flexcoders] Referencing application object in an mxml
component
Hi,
Application class is a singleton class and it has a static property
named "application", that's where reference of Application instance is
stored.
So mx.core.Application.application would always point to main
application....
-abdul
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Doodi, Hari - BLS CTR
Sent: Friday, June 24, 2005 8:08 PM
To: '[email protected]'
Subject: RE: [flexcoders] Referencing application object in an mxml
component
Hi Abdul,
Thanks for the response. You mean I don't have to declare a
var
of type Application in mxml component And no need to assign {this} to
app in
application mxml ? If not then how the application reference maintained
between application mxml and component mxml? It is something implicitly
managed by Flash player??
By the Way, I changed my code accordingly with your suggestion and it
did
work perfectly. Thanks again.
Thanks!
Hari
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Abdul Qabiz
Sent: Friday, June 24, 2005 9:20 AM
To: [email protected]
Subject: RE: [flexcoders] Referencing application object in an mxml
component
To refer Alert class, use mx.controls.Alert
To refer main application, use mx.core.Application.application
To show an alert, use mx.controls.Alert.show(..) or
mx.core.Application.alert(..)
-abdul
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Doodi, Hari - BLS CTR
Sent: Friday, June 24, 2005 6:26 PM
To: '[email protected]'
Subject: [flexcoders] Referencing application object in an mxml
component
Hi All,
I have an mxml component extending TabNavigator called
MyTabNavigator.mxml. Also I have application mxml in which I am using
MyTabNavigator called tabNavigation.mxml.
Now I want to know how to access functions implemented in
tabNavigation.mxml from MyTabNavigation.mxml. I tried a methodology
mentioned in the Flex help system as below but did not work. Please help
.
<!--- MyTabNavigator.mxml -->
var app:tabNivigation:
.
.
.
private function alertHandler(...)
{
.
.
. app.application.saveData(); // saveData is implemented in
tabNavigation.mxml application
.
........
}
<!-tabNavigation.mxml -->
...
<mx:Script>
<![CDATA[
function saveData()
{
Alert.show("SaveData will be called",'Save Data');
}
]]>
</mx:Script>
...
<local:MyTabNavigator id="dataTabNav" width="672" height="407"
marginTop="1"
borderColor="#9900FF" borderStyle="solid"
change="tabChanging(event.target.selectedIndex)" app="{this}">
When I run the application( tabNavigation.mxml) I did not get the alert
from
saveData() function. That means application method is not activated from
mxml component.
Thanks in advance.
Thanks!
Hari
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/