Solved

ERRO TitleWindow --> call method MDIWindow

Posted on 2011-09-03
9
312 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adobe AIR in bar  launch 3 278
FLEX 3 LineChart doubt 4 279
Flex / Air app - moving the dataservices around 2 321
[Q] XML to Object/Dictionary class available? 3 710
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…
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

773 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