ERRO TitleWindow --> call method MDIWindow

Posted on 2011-09-03
Last Modified: 2012-05-12

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();

Question by:eduardo12fox
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
LVL 29

Expert Comment

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 ();

Author Comment

ID: 36480275
I recreated my environment to demonstrate the error please visit this link:

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

please help me.
LVL 29

Expert Comment

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
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

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{
LVL 29

Expert Comment

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

Author Comment

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.


Apps ---> Call ---> Janela2

step 2

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

Author Comment

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.
LVL 29

Accepted Solution

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();                  

Author Closing Comment

ID: 36483513
Yes thanks dgofman

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