Solved

Change value of Variable in Module

Posted on 2010-08-20
3
400 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

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…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

9 Experts available now in Live!

Get 1:1 Help Now