Solved

ERRO TitleWindow --> call method MDIWindow

Posted on 2011-09-03
9
313 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
  • 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

839 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