Dispatch an Event at HeaderRenderer

Hi all!
I have a HeaderRenderer which has a checkbox and a button. The checkbox it is replaced by an image when teh updatedisplaylist event is dispatched, so far this work fine. Even though when I add a couple of headerrenderers to a couple of datagrid columns. These new headerrenderers have a combobox and a label, the column with the 1st headerrenderer stops refreshing itself... but whe you click or move the sidescroll bar of the datagrid the header refresh itself and shows the image. What am I doing wrong with the other headerrenderers or how can I listen and fire an event within a headerrenderer to update the display?. Thanks in advance.
Frank
P.S. I'm using Flex builder 4.5, MX Datagrid

You're listening for "backtomain" but dispatching "myevent".

Similar Messages

  • Why doesn't the TimeTrait dispatch currentTimeChange event?

    There are cases when I would like a VideoElement's TimeTrait to dispatch currentTimeChange events in addition to complete and durationChange events. I'm wondering what the logic is to not have this trait dispatching this event from the currentTimeChangeEnd protected method? Seems the only way to track an elements current time is to track it at the player level.

    You can setup your own timer and track the currentTime values inside a TimeTrait instance.
    I don't know why the TimeTrait doesn't dispatch the currentTimeChange event, but I suppose that this is intentional - you don't want to provide this kind of utility methods at this low level API level.
    ionflow, why isn't MediaPlayer API good enough for you? Why do you need to get these events at the TimeTrait level?

  • Dispatching an event during check-in process

    I am a newbie to adobe illustrator CS6 sdk.
    I am trying to add an event listener to the existing check-in menu item.
    When check-in is invoked i want to dispatch an event to cs extension.
    I got hold of the check-in menu item in AIMenuItemHandle, but i do not find any functions to add any event listeners to the check-in option.
    How do I add event listener to the check-in menu item?
    Thanks in Advance,
    Senthil.

    I didn't see a notifier myself, but I was hoping I was just not noticing it.
    There isn't really an SDK for walking through menus & such. the AICommandManager.h header has some functions for searching for CommandIDs, but a CommandID is basically a keyboard shortcut. So that will only work if there's one associated with the menuitem you're trying to invoke. If so, there look to be some methods in that header for searching for it based on partial name matching -- localized or not. That might get you the CommandID you want, assuming its available. It must not always be avaialble, because I don't see a 'Check in' option in my version of CS6 -- presumbly this requires VersionCue or whatever it is Adobe has for this?

  • Dispatching an event from a PDF to AIR?

    I would like to put a button in a PDF using Acrobat, that,
    when clicked, dispatches an event that can be picked up by my
    displaying AIR application. The PDF is being displayed in AIR using
    HTMLLoader in an HTML object.
    Is this possible?

    Try the following. On the first frame of the movieclip place
    the following code.
    // Event Routines //
    var dispatchEvent:Function;
    var addEventListener:Function;
    var removeEventListener:Function;
    mx.events.EventDispatcher.initialize(this);
    Then on the "x" frame of the movieclip, place the following
    code:
    var evt:Object = new Object();
    evt.type = "framereached"; // this can be whatever you wish
    to listen for
    evt.target = this;
    dispatchEvent(evt);
    This is how you would do this in a class and it should work
    just as well if coded directly onto a frame. However, to make this
    more versatile I would place it in a class with a public function,
    for example, name throwEvent(). This public method would then
    execute the above code and could be called from any frame. You
    could even add another item to the evt object that would contain
    the frame the executed the event.
    Tim

  • [svn:osmf:] 15196: Fix bug FM-621: SerialElement dispatches READY event twice.

    Revision: 15196
    Revision: 15196
    Author:   [email protected]
    Date:     2010-04-01 21:16:48 -0700 (Thu, 01 Apr 2010)
    Log Message:
    Fix bug FM-621: SerialElement dispatches READY event twice.  Fix inconsistency between MediaPlayer.stop implementation and ASDoc (i.e. the method should always rewind).  Temporarily disable DurationElement test, needs some investigation as to why it behaves so different from the other MediaElement-in-MediaPlayer tests.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-621
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/elements/compositeClasses/SerialSeekTrait.as
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/OSMFTest/org/osmf/OSMFTests.as
        osmf/trunk/framework/OSMFTest/org/osmf/media/TestMediaPlayer.as

  • [svn:osmf:] 17565: Fix FM-937: ProxyElement dispatches trait events for blocked and overridden traits.

    Revision: 17565
    Revision: 17565
    Author:   [email protected]
    Date:     2010-09-02 17:30:08 -0700 (Thu, 02 Sep 2010)
    Log Message:
    Fix FM-937: ProxyElement dispatches trait events for blocked and overridden traits.  Add unit test.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-937
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/elements/ProxyElement.as
        osmf/trunk/framework/OSMFTest/org/osmf/elements/TestProxyElement.as

  • Dispatching an event from a command

    Hi,
    In one for my commands in the Cairngorm based application I'm working on I need to dispatch a event to amend the view. In my command I'm amending some value objects in a ArrayCollection, which is the data source for a List component in my view. Once I completed my changes to these value objects I'd like to dispatch a event to resort the ArrayCollection and update my view to the new order.
    What is the best approach for dispatching an event in the command?
    Thanks
    Stephen

    Great question - I'm currently sorting out how to do this myself.  I'm new to Cairngorm but have a decent amount of experience with Flex.  Here are my thoughts:
    Cairngorm promotes decoupling of the data model and front controller/commands from the view - which is appropriate for an MVC framework. Data binding supports this seperation (to an extent) and keeps the view up to date with the model in 'real time'.  Data binding does not however provide an intuitive mechanism for reacting to cairngorm event results.  So here a few solutions I've been tossing around:
    1.  Rely on Built in Flex events such as the datagrid's dataChange event to trigger a reaction.
    2.  Create view state variables in the model that, when changed through the front controller / commands, dispatch custom events from within their VO's / setters / ect.
    3.  Dispatch custom events directly from front controller / commands.
    4.  Create custom (or override existing) item renderers that self-transition / tween when changed as a result of data binding.
    I'm sure there are other ways to do what we want, but I'm out of ideas.  Which approach to take very well depends on how strongly you'd like to adhere to the MVC concept.  Commands that dispatch generic events as their messages may or may not be acceptable to you - but they provide a straitforward way to trigger view related reactions without relying on data binding events.  I'd be interested to know if Cairngorm 3 will address this challenge...
    Let me know what you decide on if and when you make a choice!

  • Dispatching an event from a MovieClip???

    Hello, can somebody tell me if there is a way to dispatch an
    event from a Movieclip?, I tried to dispatch an event from a class
    and all ran ok. But now, if I have a Movieclip on my scenario and I
    want that when it arrive to "x" frame it dispatch an event that
    could be catched by a listener on the _root, what I have to do?
    (without doing use of classes), thanks a lot.

    Try the following. On the first frame of the movieclip place
    the following code.
    // Event Routines //
    var dispatchEvent:Function;
    var addEventListener:Function;
    var removeEventListener:Function;
    mx.events.EventDispatcher.initialize(this);
    Then on the "x" frame of the movieclip, place the following
    code:
    var evt:Object = new Object();
    evt.type = "framereached"; // this can be whatever you wish
    to listen for
    evt.target = this;
    dispatchEvent(evt);
    This is how you would do this in a class and it should work
    just as well if coded directly onto a frame. However, to make this
    more versatile I would place it in a class with a public function,
    for example, name throwEvent(). This public method would then
    execute the above code and could be called from any frame. You
    could even add another item to the evt object that would contain
    the frame the executed the event.
    Tim

  • [svn:osmf:] 17497: Fix FM-933: ProxyMetadata doesn' t dispatch change events for its initially set inner metadata.

    Revision: 17497
    Revision: 17497
    Author:   [email protected]
    Date:     2010-08-27 09:58:09 -0700 (Fri, 27 Aug 2010)
    Log Message:
    Fix FM-933: ProxyMetadata doesn't dispatch change events for its initially set inner metadata.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-933
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/elements/LoadFromDocumentElement.as
        osmf/trunk/framework/OSMF/org/osmf/elements/ProxyElement.as
        osmf/trunk/framework/OSMF/org/osmf/elements/proxyClasses/ProxyMetadata.as
        osmf/trunk/framework/OSMFTest/org/osmf/elements/TestProxyElement.as

  • Help with dispatching JTable event to underlying components in a cell.

    Hello..
    I have a JTable in which i show a panel with clickable labels.. I found that jTable by default doesnt dispatch or allow mouseevents to be caught by underlying elements..
    i need help with dispatching an event from jTable to a label on a panel in a jTable cell.. below is the code i have come up with after finding help with some websites. but i couldnt not get it right.. my dispatched event seems to go back to the jtable itself ..
    any help or suggestion is appreciated..
    Thanks
    'Harish.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.table.*;
    * @author  harish
    public class tableDemo extends javax.swing.JFrame {
        JTable jTable1;
        testpane dummyPane;
        /** Creates new form tableDemo */
        public tableDemo() {
            initComponents();
            //table settings
            String[] columnNames = {"Task", "Action"," "};
            Object[][] data = { };
            DefaultTableModel model = new DefaultTableModel(data, columnNames) {
              // This method returns the Class object of the first
              // cell in specified column in the table model.
            public Class getColumnClass(int mColIndex) {
                int rowIndex = 0;
                Object o = getValueAt(rowIndex, mColIndex);
                if (o == null)
                    return Object.class;
                } else
                    return o.getClass();
            jTable1 = new javax.swing.JTable(model);
            jTable1.addMouseListener(new MouseAdapter(){
              public void mouseClicked(MouseEvent e){
                  System.out.println("Clicked");
                  handleTableMouseEvents(e);
                 //invokeExternalApp("http://www.pixagogo.com");
              public void mouseEntered(MouseEvent e){
                  System.out.println("Entered");
                  //handleTableMouseEvents(e);
              public void mouseExited(MouseEvent e){
                  System.out.println("Exited");
                  //handleTableMouseEvents(e);
            jTable1.setRowHeight(100);
            jTable1.getTableHeader().setReorderingAllowed(false);
            jTable1.setBackground(new java.awt.Color(255, 255, 255));
            jTable1.setGridColor(new Color(250,250,250));
            jTable1.setShowGrid(true);
            jTable1.setShowVerticalLines(true);
            jTable1.setShowHorizontalLines(false);
            jTable1.setFont(new Font("Arial",0,11));
            jTable1.setMaximumSize(new java.awt.Dimension(32767, 32767));
            jTable1.setMinimumSize(new java.awt.Dimension(630, 255));
            jTable1.setPreferredSize(null);
            jTable1.setBackground(new Color(255,255,255));
            int vColIndex=0;
            TableColumn col = jTable1.getColumnModel().getColumn(vColIndex);
            int width = 100;
            col.setPreferredWidth(width);
            //add item to 2nd cell       
            Vector vec = new Vector();
            vec.addElement(null);
            dummyPane = new testpane();
            vec.addElement(dummyPane);
            ((DefaultTableModel)jTable1.getModel()).addRow(vec);
            jTable1.repaint();
            this.getContentPane().add(jTable1);
            jTable1.getColumn("Action").setCellRenderer(
              new MultiRenderer());
        protected void handleTableMouseEvents(MouseEvent e){
            TableColumnModel columnModel = jTable1.getColumnModel();
            int column = columnModel.getColumnIndexAtX(e.getX());
            int row    = e.getY() / jTable1.getRowHeight();
            testpane contentPane = (testpane)(jTable1.getModel().getValueAt(row, column));
            // get the mouse click point relative to the content pane
            Point containerPoint = SwingUtilities.convertPoint(jTable1, e.getPoint(),contentPane);
            if (column==1 && row==0)
            // so the user clicked on the cell that we are bothered about.         
            MouseEvent ev1 = (MouseEvent)SwingUtilities.convertMouseEvent(jTable1, e, contentPane);
            //once clicked on the cell.. we dispatch event to the object in that cell
         jTable1.dispatchEvent(ev1);
        private void initComponents() {
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-528)/2, (screenSize.height-423)/2, 528, 423);
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            new tableDemo().show();
        // Variables declaration - do not modify
        // End of variables declaration
        class testpane extends JPanel{
            public testpane(){
            GridBagConstraints gridBagConstraints;
            JPanel testpane = new JPanel(new GridBagLayout());
            testpane.setBackground(Color.CYAN);
            JLabel lblTest = new JLabel("test");
            lblTest.addMouseListener(new MouseAdapter(){
              public void mouseClicked(MouseEvent e){
                  System.out.println("panelClicked");
              public void mouseEntered(MouseEvent e){
                  System.out.println("panelEntered");
              public void mouseExited(MouseEvent e){
                  System.out.println("panelExited");
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 0;
            gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
            testpane.add(lblTest,gridBagConstraints);
            this.add(testpane);
    class MultiRenderer extends DefaultTableCellRenderer {
      JCheckBox checkBox = new JCheckBox();
      public Component getTableCellRendererComponent(
                         JTable table, Object value,
                         boolean isSelected, boolean hasFocus,
                         int row, int column) {
        if (value instanceof Boolean) {                    // Boolean
          checkBox.setSelected(((Boolean)value).booleanValue());
          checkBox.setHorizontalAlignment(JLabel.CENTER);
          return checkBox;
        String str = (value == null) ? "" : value.toString();
        return super.getTableCellRendererComponent(
             table,str,isSelected,hasFocus,row,column);
        return (testpane)value;
    class MultiEditor implements TableCellEditor {
      public MultiEditor() {
      public boolean isCellEditable(EventObject anEvent) {return false;}
      public boolean stopCellEditing() {return true;}
      public Object getCellEditorValue() {return null;} 
      public void cancelCellEditing() {}
      public boolean shouldSelectCell(EventObject anEvent) {return false;}
      public Component getTableCellEditorComponent(JTable table, Object value,
                  boolean isSelected, int row, int column) {
        if (value instanceof testpane) {                       // ComboString
          System.out.println("yes instance");
        return null;
      public void addCellEditorListener(javax.swing.event.CellEditorListener l) {
      public void removeCellEditorListener(javax.swing.event.CellEditorListener l) {
    }

    any help on this.. anybody. ?

  • How to dispatch an event to the host application?

    Can I create a keyboardEvent and dispatch it to the host application?
    I'm trying to create an onscreen keyboard, so on every mouseUp event, a corresponding keyboardEvent is created and dispatched to the host application.
    Is it even possible to dispatch a keyboard event programatically?

    I can dispatch Keyboard Events programatically, and event listener inside my extension works just fine.
         var evnt:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, false, Keyboard.M);
         this.dispatchEvent(evnt);
    However, the KeyBoardEvent is not propogating up to the host application (Illustrator).
    What do I need to do to send it on to the host application?

  • Dispatching Custom Event

    Hello everybody,
    Task: I want to enter a message in input text field and
    write it in the dynamic using a custom event dispatching.
    Solution: I have 2 textfields on the stage.
    One textfield is an input text field the other is a dynamic
    text field which will server just to display text.
    on the flash in the first frame I made this code:
    // mb is the instance name of the dynamic text field already
    placed on the stage
    var messageBoard:MsgBoard = new MsgBoard(mb);
    // u1 is the input text field placed on the stage
    var user1:UserInput = new UserInput(u1);
    Also I wrote 3 very simple classes.
    1. UserInput.as // input textfield class that listens to
    input and dispatches a custom event
    2. MsgEvnt.as // custom event class the instance of which is
    dispatched
    3. MsgBoard.as // class that listens to the new event and
    once it occurs adding event message to the textfield
    Problem: Somehow it doesn't work. I actually made it work by
    making a listener the same object that dispatches the event. But I
    want to understand why it doesn't works the way I showed above. I
    browsed a lot of forums and found that all the people use to listen
    by the same object that is dispatching. I think it's like talking
    with yourself isn't it?
    Thanks everybody who will reply and I hope it will help
    someone who will read!

    your event is dispatched within UserInput scope and MsgBoard
    is not within UserInput scope so it's not going to receive that
    event. ie, a UserInput instance is not accessible to MsgBoard.
    you may have a basic misunderstanding: events that are
    dispatched are not like radio signals that are transmitted and
    anyone with a listener (radio) can hear them.
    when you dispatch an event using actionscript, it is
    dispatched by an object (or sometimes by a class) and that event
    can only be detected by the dispatching object (or class).

  • How to dispatch an event on external topic

    Hi, I need to know if it is possible to dispatch an event on an external (BEA) Topic instead of ENS server queue.
    If yes, any link for docs/example?
    My scenario is: JCS 5.0 and Messaging Server 6.3
    Thanks in advance

    Hi Everyone,
    Im currently having a problem with the event notification service for sun java calendar server 6( sun communication suite 5)...i have successfully compiled the sample publisher apub.c and subscriber asub.c..apart from this i haven't done any changes/settings in ics.conf or any other file..when i run the code using the following :
    subscriber window:asub.c
    ./a.out localhost 57997
    subscription successfull
    publisher window:apub.c
    ./a.out localhost 57997
    apub>bla bla
    apub>.
    #[root@localhost~]:In the output for apub.c when the apub prompt appears the logic of the code simply has to put whatever we type onto the publisher window(publish) and when i enter '.' on a line by itself the publisher shuts down..*But in my case there is nothing appearing on the subscriber window..there is no notification happening...*
    Can i please know if i have missed out any steps..and also if ENS really works.._The thing i want to finally achieve is to somehow get the text/calendar response object containing the event details with the help of ENS_...i'll be grateful if anybody could answer me..
    many thanks,
    Bharath

  • How to dispatch an event from the application to the preloader

    HI everyone
                     I've been searching everywhere on the net, and as far as it goes I gotten no answer for this. When the application hit the preinitialize phase, I'm calling the loadStyle method. As you can see I will hold the CreationComplete event until I the swf is ready. What I want to do, is to have a second loading bar in the preloader (no problem here) to show the progress of the swf downloaded, hence the StyleEvent.PROGRESS event. I would like to know how can I dispatch that event to the preloader?
    ///////////////////APPLICATION
                  import mx.events.StyleEvent;
                import mx.styles.StyleManager;
                private function loadStyle():void
                        var eventDispatcher:IEventDispatcher = StyleManager.loadStyleDeclarations("cl/elmelej/mangiare/estilo/estilo.swf");
                        eventDispatcher.addEventListener(StyleEvent.COMPLETE, completeHandler);
                        eventDispatcher.addEventListener(StyleEvent.PROGRESS,progreso);  
                private function completeHandler(event:StyleEvent):void
                        super.initialized = true;
                private function progreso(event:StyleEvent):void
                override public function set initialized(value:Boolean):void
                    // Hold off until the Runtime CSS SWF is done loading.
    ///////////////////////////////////PRELOADER
    virtual public function set preloader(value:Sprite):void
                _preloader = value;
                value.addEventListener(ProgressEvent.PROGRESS, progressHandler);   
                value.addEventListener(Event.COMPLETE, completeHandler);
                value.addEventListener(StyleEvent.PROGRESS, progressHandlerCSS);  
                value.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
                value.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
    As you can see, the preloader is listening to StyleEvent.PROGRESS  events, but I cant dispatch that event to the preloader so that it can react to it. I hope you can help me. Thanks for your time and help
    Sebastián

    Alex,
             Thank you very much for the fast answer, but I'm not an advanced programmer in Flex, so I would need a bit more help from you. I wouldlike you to tell me if it is possible to do what I want to do? and could you be more specific n the information you gave me please?
    I think you mean something like this:
    private function progreso(event:StyleEvent):void
                  (this.systemManager.getChildAt(systemManager.numChildren) as Preloader).getChildAt(XXXXXXXX).dispatchEvent(event)
    /////////////////////// (this.systemManager.getChildAt(systemManager.numChildren) as Preloader)) -------->gets the preloader 
    ///////////////////////(this.systemManager.getChildAt(systemManager.numChildren) as Preloader).getChildAt(XXXXXXXX)     -------------> would get the progressbar (only If I have XXXXXvalue)      
    let me tell you that the method that I posted on the last message was a part of this class:
         public class PreloaderDisplayBase extends Sprite implements IPreloaderDisplay
    PreloaderDisplayBase is my Preloader.
    I hope you can help me.
    Thanks Again
    Sebastián Toro O

  • [svn] 4707: Dispatch propertyChange event for horizontalScrollPosition/ verticalScrollPosition so the thumbnail in the scroller will track the movement made via the keyboard .

    Revision: 4707
    Author: [email protected]
    Date: 2009-01-28 09:00:45 -0800 (Wed, 28 Jan 2009)
    Log Message:
    Dispatch propertyChange event for horizontalScrollPosition/verticalScrollPosition so the thumbnail in the scroller will track the movement made via the keyboard.
    QE Notes:
    Doc Notes:
    Bugs: SDK-18887
    Reviewers: Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18887
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as

    Revision: 4707
    Author: [email protected]
    Date: 2009-01-28 09:00:45 -0800 (Wed, 28 Jan 2009)
    Log Message:
    Dispatch propertyChange event for horizontalScrollPosition/verticalScrollPosition so the thumbnail in the scroller will track the movement made via the keyboard.
    QE Notes:
    Doc Notes:
    Bugs: SDK-18887
    Reviewers: Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18887
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as

Maybe you are looking for

  • Runtime.exec() - how to open new window for new program?

    Hi, I have searched through the forums but haven't found an answer to this one yet. I am using runtime.exec() to start up a new java program. At first I thought it wasn't running properly but, after checking task manager, I have discovered that the n

  • My mozilla shows not working when i try to change my ip with true socks. why?

    It was working perfectly... until it start showing a plugins error. I had to disable a recently added plugin before it could work. But now immediate i try to open my browser after the changes of the true socks soft ware.. it immediately show that fir

  • Putting my ipod tunes onto my new computer

    Hi Just bought a new computer, have installed itunes, but can't transfer my ipod tunes to the library. How the **** do i do this?!? It's willing to transfer music from windows media into itunes, then on to the ipod. Please help!!!!!

  • B/W G3 SCSI card problem

    Hi all, I have a rev. 1 B&W G3. Its 400 mhz and has 1gb of RAM and the stock ATI Rage. This machine came from the factory with an Ultra SCSI II card and a 9 GB SCSI II HD. About a year or so ago the HD died and I tryed to replace it with a cheap IDE

  • UUID problem with Device Development ????

    Hi All, I am making a mobile application, targeting all platform, i.e., Android, blackberry & iOS. I have a requirement, where I am able to trace the UUID of the device, is there any way, by which I can access the uuid of the device? Thanks, Ravi.