Solved

Change value of Variable in Module

Posted on 2010-08-20
3
403 Views
Last Modified: 2012-05-10
I have a variable in my module that i need to change the value of from a component.

The variable in the madule looks like this:
[Bindable]
public var vaSec:Boolean = false;

How is this done?
public function txtSecurity_changeHandler(event:TextOperationEvent):void
			{
				if (securityText.text == txtSecurity.text)
				{
					parentApplication.vaSec = true;
				}
				
			}

Open in new window

0
Comment
Question by:kbnordvest
3 Comments
 
LVL 4

Accepted Solution

by:
andreMariano earned 250 total points
ID: 33489897
if its not working like the way you did it, you can cast the parentApplication
for example, if the name of your application is myApp
you will do like this:
public function txtSecurity_changeHandler(event:TextOperationEvent):void
			{
				if (securityText.text == txtSecurity.text)
				{
					myApp(parentApplication).vaSec = true;
				}
				
			}

Open in new window

0
 
LVL 8

Expert Comment

by:IqAndreas
ID: 33492441
Sorry, I don't fully understand what you are trying to do. Do you think you could elaborate a bit more?

Could you give a basic overview of the classes you are using, as well as the relationship of each class, including how the display objects are laid out (child of child etc)


Are you getting any errors from your current code, or is it just not working?
0
 

Author Closing Comment

by:kbnordvest
ID: 33498676
I use the "myApp(parentApplication)". This only gave me access to my main application. I could see variables inside the Module, however i could not change the value of them. I ended up adding the Component code into the Module.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now