Solved

ERRO TitleWindow --> call method MDIWindow

Posted on 2011-09-03
9
316 Views
Last Modified: 2012-05-12
Hello,

I have a problem with a window made with MDIWindow i call a funciton in that window that opens a TitleWindow this way:

var popup_Ed: PAINEL_BAIXA PAINEL_BAIXA = new ();
popup_Ed.Id_doc = GRID_APAGAR.selectedItem.Id;
PopUpManager.addPopUp (popup_Ed, this, true);
PopUpManager.centerPopUp (popup_Ed);

Ai titleWindows this opens the window I have a funcition that needs to access a function that is in MDIWindow but whenever I try to give error null. I'm trying like this:

(parent as CONTAS_A_PAGAR).LimpaGrid();
parentDocument.LimpaGrid();

HELP
0
Comment
Question by:eduardo12fox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 36479515
I have two questions:
1) what is MDIWindow? I don't know any standard Adobe components with this name.
2) What this constractor should do and why you are not gettings errors?

var popup_Ed: PAINEL_BAIXA PAINEL_BAIXA = new ();
0
 

Author Comment

by:eduardo12fox
ID: 36480275
I recreated my environment to demonstrate the error please visit this link:
http://www.techall.com.br/expertexchange/teste.html

see that when I try to access a property of the father by the son of null error

please help me.
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36481031
You have to use parentDocument instead parent

private function Abrir():void{
    (parentDocument as teste).OpenJanela();
}

The parent instance is SystemManager class not "teste" class
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:eduardo12fox
ID: 36481245
It did not work! He opens the same TitleWindow and I want to open the Alert which is the parent Apps

public function AbraAlert():void{
            
                  Alert.show("CHEGOU");
            
            }
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36481517
what are you expecting why didn't work.

I am running your code and i ca open same window again and again without error

that was your prblem
0
 

Author Comment

by:eduardo12fox
ID: 36481925
Friend would like first to thank your help. I updated you on the internet to see what is wrong. I do not want to open the same window I open the ALERT is the main application that I want from within the TitleWindow Alert me to open the application that is called TitleWindow.

example:

Apps ---> Call ---> Janela2

step 2

Janela2---> Call ---> Public AbraAlert function ():void{  Alert.show("CHEGOU");  }
0
 

Author Comment

by:eduardo12fox
ID: 36481931
To explain very detailed, I do not want to open the same window when I click on the TitleWindows AbraAlert I open the function that is called in the application TitleWindow.
0
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 36482127
Man are u kidding, why you just didn't replace calling function?

private function Abrir():void{
   (parentDocument as teste).AbraAlert();                  
}
0
 

Author Closing Comment

by:eduardo12fox
ID: 36483513
Yes thanks dgofman
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

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…
A look at what happened in the Verizon cloud breach.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

636 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