setting priorities for listeners

Posted on 2011-09-07
Medium Priority
Last Modified: 2012-05-12
hi guys

I have my customgrid like this

public class CustomGrid extends VBox

private var id:String = "";
private function buildColumn(headers:Object,fields:Object):void{

private function createAutoPopulate(event: flash.events.KeyboardEvent) : void {      
PopUpManager.addPopUp(tradeLookUp.dataGrid, this, false);      //show data
PopUpManager.centerPopUp(tradeLookUp.dataGrid);     //center popup


private function itemEditEndHandler(event:AdvancedDataGridEvent):void{
use 'id' here  

private function  populatedata ( event:CheckBoxEvent ) : void {
id = event != null && event.data != null ? event.data.userId : "";


buildColumn()  is the first function which is called.

createAutoPopulate()  is second function which is called

itemEditEndHandler()  is the third function which is called

populatedata()  is the last function which is called

but the problem is i want populatedata() to be the third function which should be called and
itemEditEndHandler() should be called last.

from populatedata() i will have the 'id' which i can use in itemEditEndHandler().

any idea how i can set the priorities? i want populatedata()  to be called before itemEditEndHandler().

Question by:royjayd
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
  • 3
LVL 29

Accepted Solution

dgofman earned 2000 total points
ID: 36500654
The first problem you cannot use "id" variable name in AS classes because id already declared in UIComponent

Another problem I cannot create valid project using your custom class. Please can you attach a working example.

Author Comment

ID: 36500680
>>Another problem I cannot create valid project using your custom class. Please can you attach a working example.

Its 600 lines of actionscript code, if i paste the whole thing you will get lost, thats why i pasted only what makes sense :)
LVL 29

Expert Comment

ID: 36500812
you can attach files. look on the botton a "File" link
LVL 29

Expert Comment

ID: 36500816
If you can attach a whole project it's better. Don't worry I can read any code
LVL 37

Expert Comment

ID: 36527633
>> i want populatedata() to be the third function which should be called and itemEditEndHandler() should be called last.
Those methods will be called when the corresponding event is "seen" or "heard", so imo if you want the methods to be called in that specific order, you have to make sure that the events occur in that specific order. But I'm afraid that is somehting you don't control, do you?
Why is that specific order important to you? Maybe you have to rethink that...

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

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…
I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month8 days, 8 hours left to enroll

764 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