SetFocus() in InteractionManager is not working?

Hi,
I'm trying to implement TLF in out chat application and looks like setFocus() command in InteractionManager has a bug. Here is a code demonstrating it:
var tf:TextFlow = new TextFlow(); // define TextFlow and manager objects
var em:EditManager = new EditManager();
cc = new DisplayObjectContainerController(this, 290, 38);
tf.interactionManager = em;
// compose TextFlow to display
tf.flowComposer.addController(cc);
// add event handler to listen for SelectionEvent
tf.addEventListener(SelectionEvent.SELECTION_CHANGE, selectionHandler);
tf.addEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGED, graphicStatusChangeHandler);
tf.flowComposer.updateAllContainers(); // update visual representation
// format configuration
var charFormat:CharacterFormat = new CharacterFormat();
charFormat.color = me.colorsArray[me.currColor];
charFormat.fontFamily = "Tahoma, _sans";
charFormat.fontSize = 12;
charFormat.lineHeight = "80%";
tf.hostCharacterFormat = charFormat;
tf.interactionManager.setSelection(0,0);
var pf:ParagraphFormat = new ParagraphFormat();
pf.direction = Direction.RTL;
pf.marginLeft = 2;
pf.marginRight = 3;
pf.marginTop = 5;
IEditManager(tf.interactionManager).applyParagraphFormat(pf);
tf.interactionManager.setFocus();
Actually I see a cursor appears on screen but when I enter the text I am unable to see it. When I'll click with my mouse on the text edit area I can able to enter the text. Tell me what I'm doing wrong. May be the problem is only for text area which is set to RTL user input?
Looks like in the  online rich text editor demo you have exactly the same problem, when you switch text direction from LTR to RTL you can't enter the text until you click with your mouse on the text edit area.
Igor Vasiliev
www.blogtv.com

The problem with the new one is a file size - when I'm trying to include new TLF library to my project I can't compile it in Flash CS4. Actually I had exactly the same problem with the old one too, but after a short investigation I found that the problem is a large amount of code I have in the existing project and I put several things to the external SWF file and now I'm able to compile and work with it. The new TLF library is twice big then the old one and I'm unable to compile it at all within my project. ;(
Now, regarding the problem I posted here I think you have a runtime problem. Actually I found a solution, I just set focus with 500 milliseconds delay and now it works. Looks like when I make first call you updating something on the screen and can't set it for the first time.
Personally I think the file size of the TLF library is the biggest problem now with Flash CS4. Looks like IDE unable to compile projects with a lot of code inside. I never saw this happens with old Flash CS3. ;(

Similar Messages

  • SetFocus not working in older versions of Reader (pre version 8)

    I have a form that was created in LiveCycle Designer 8.2 and has the following issue:
    I have used the setFocus method to help the form filler (end user) navigate around the form. It works fine when the end user is viewing the form in Reader version 8 or higher, but it does not work in earlier versions. is there a work around to get similar functionality in earlier versions of Reader.
    Example:
    there is a drop-down list where the user is directed to different fields depending on their answer. it uses the following if expression in the "validate" event:
    if (this.rawValue == 2){
    xfa.host.setFocus(textField1);
    if (this.rawValue == 1) {
    xfa.host.setFocus(DropDownList2);

    Brian,
    One more thing about the setFocus issue:
    I tried my test form on Adobe Reader 6.0.2 and the setFocus worked OK when using the somExpression.
    So adding the somExpression to the setFocus works with Reader 6.0.2 and up, but it did not work with Reader 6.0 or Reader 6.0.1.
    LC Designer 8.2 will let you set the minimum target version in the "Form Properties" "Defaults" tab to 6.0.2, so that may be the lowest version it supports. I did notice that at this 6.0.2 version my other Javascript code does not function; not sure why.
    Ron

  • Logout Script not working in 10.9.3 Mavericks

    Sorry for the duplicate post, but this issue is with MacBook Pro not iMac.
    Can anyone tell me why this logoutscript will not work using LogouHook in Mavericks.  The exact same script worked with Lion and Mountain Lion.
    #!/bin/csh
    ## CCS-Checkout Logout Script
    if ( $USER == 'ccs-checkout' ) then
    #first, unlock all files
    /usr/bin/chflags -R nouchg /Users/ccs-checkout/*
    /usr/bin/chflags -R nouchg /Users/ccs-checkout/.Trash/
    /usr/bin/chflags -R nouchg /Users/ccs-checkout/.??*
    #then, delete all of the files
    /bin/rm -R /Users/ccs-checkout
    #copy a "clean" version of the ccs-checkout users home directory
    /usr/bin/ditto -rsrcFork /var/skel/ccs-checkout /Users/ccs-checkout
    #ensure that the users directory exists and set the privs
    /usr/sbin/chown -R ccs-checkout:wheel /Users/ccs-checkout
    /bin/chmod -R 775 /Users/ccs-checkout/
    #make sure trash is empty
    /bin/rm -R /Users/ccs-checkout/.Trash/
    #make sure trash dir exists and set privs for trash and dot files
    /bin/mkdir /Users/ccs-checkout/.Trash
    /usr/sbin/chown -R ccs-checkout /Users/ccs-checkout/.??*
    /bin/chmod -R 700 /Users/ccs-checkout/.??*
    endif
    exit 0
    The script will run in terminal when copied and pasted from #first, unlock all of the files to exit 0.
    When I run defaults write com.apple.loginwindow LogoutHook /usr/local/bin/LogoutScript the date on the com.apple.loginwindow.plist file changes so it is being modified.
    Apparently there is something in:
    #!/bin/csh
    ## CCS-Checkout Logout Script
    if ( $USER == 'ccs-checkout' ) then
    That Mavericks does not like or won't execute.
    To duplicate this issue on your MBP make a user named ccs-checkout with normal permissions and autologon.  After the first logon of the ccs-checkout user log out and log on as root and copy the ccs-checkout users local profile to the /var/skel/ folder.  Then make the above script into an executable .sh file named LogoutScript and place it in the /usr/local/bin/ folder and run the above LogoutHook.
    Thanks for any help with this issue.

    This is the part of code where script fails. In 9.2 I haven't any kind of problems.
                        think(0.1);
                   forms
                   .tree(100,
                        "//forms:tree[(@name='ZVE_PREGLED_ZAVAROVANJE_0')]")
                        .expandNode(
                        "X");
                        think(0.1);
                   forms
                   .tree(101,
                        "//forms:tree[(@name='ZVE_PREGLED_ZAVAROVANJE_0')]")
                        .selectNode(
                        "XY");
                        think(0.1);
                   forms
                   .tree(102,
                        "//forms:tree[(@name='ZVE_PREGLED_ZAVAROVANJE_0')]")
                        .activateNode(
                        "XYZ");
                        think(0.1);
                   forms
                   .textField(103,
                        "//forms:textField[(@name='INFO_BLOCK_IZBRANA_ZAVAROVANJA_0')]")
                        .setFocus();
                        think(0.1);
                   }

  • Getting input from mouse-wheel: does not work under windows/IE

    Hi
    I have built an applet that extends JApplet. To it I have added a class that extends JPanel implements MouseListener, MouseWheelListener, MouseMotionListener.
    I collect input using the method
    public void mouseWheelMoved(MouseWheelEvent e){
    do stuff...
    I have build this on a mac and tested it in firefox and it works fine. But on xp/vista internet explorer, the applet does not respond to mousewheel input. On mac osx /safari it does not work either.
    Is there any solution to this problem?
    Best regards, Carlis.

    Just for luck, try setting the JPanel focusable.panel.setFocusable(true);If that doesn't make a difference, you need to post a [_Short, Self Contained, Compilable and Executable, Example Program (SSCCE)_|http://mindprod.com/jgloss/sscce.html] that clearly demonstrates your problem.
    db

  • KeyListener on combobox calander not working?

    Am trying to add keylistener on this combobox calander, but somehow its not working right. The calendar is added to a JTable and the keyListener on it works, when i gets focus, but when the popup is visible it looses the keylistener? Can someone help me with this?
    import com.sun.java.swing.plaf.motif.*;
    import com.sun.java.swing.plaf.windows.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.plaf.*;
    import javax.swing.plaf.basic.*;
    import javax.swing.plaf.metal.*;
    import javax.swing.table.*;
    public class DateComboBox extends JComboBox
        public DateComboBox()
        public DateComboBox(int raekke,DefaultTableModel model,JTable tabel)
            this.raekke=raekke;
            this.model=model;
            this.tabel=tabel;
        public void setDateFormat(SimpleDateFormat dateFormat)
            this.dateFormat = dateFormat;
        public void setSelectedItem(Object item)
            // Could put extra logic here or in renderer when item is instanceof Date, Calendar, or String
            // Dont keep a list ... just the currently selected item
            removeAllItems(); // hides the popup if visible
            addItem(item);
            super.setSelectedItem(item);
        public void setText(String texte)
            setSelectedItem(texte);
        public String getText()
            return (String)this.getSelectedItem();
        public void setRaekke(int raekke)
            this.raekke=raekke;
        public void updateUI()
            ComboBoxUI cui = (ComboBoxUI) UIManager.getUI(this);
            if (cui instanceof MetalComboBoxUI)
                cui = new MetalDateComboBoxUI();
            } else if (cui instanceof MotifComboBoxUI)
                cui = new MotifDateComboBoxUI();
            } else if (cui instanceof WindowsComboBoxUI)
                cui = new WindowsDateComboBoxUI();
            setUI(cui);
        // Inner classes are used purely to keep DateComboBox component in one file
        // UI Inner classes -- one for each supported Look and Feel
        class MetalDateComboBoxUI extends MetalComboBoxUI
            protected ComboPopup createPopup()
                return new DatePopup( comboBox );
        class WindowsDateComboBoxUI extends WindowsComboBoxUI
            protected ComboPopup createPopup()
                return new DatePopup( comboBox );
        class MotifDateComboBoxUI extends MotifComboBoxUI
            protected ComboPopup createPopup()
                return new DatePopup( comboBox );
        // DatePopup inner class
        class DatePopup implements
        ComboPopup,
        MouseMotionListener,
        MouseListener,
        KeyListener,
        PopupMenuListener
            public DatePopup(JComboBox comboBox)
                this.comboBox = comboBox;
                setFocusable(true);
                addKeyListener(this);
                calendar = Calendar.getInstance();
                // check Look and Feel
                background = UIManager.getColor("ComboBox.background");
                foreground = UIManager.getColor("ComboBox.foreground");
                selectedBackground = UIManager.getColor("ComboBox.selectionBackground");
                selectedForeground = UIManager.getColor("ComboBox.selectionForeground");
                initializePopup();
            //========================================
            // begin ComboPopup method implementations
            public void show()
                try
                    // if setSelectedItem() was called with a valid date, adjust the calendar
                    calendar.setTime( dateFormat.parse( comboBox.getSelectedItem().toString() ) );
                } catch (Exception e)
                {e.printStackTrace();}
                updatePopup();
                popup.show(comboBox, 0, comboBox.getHeight());
            public void hide()
                popup.setVisible(false);
            protected JList list = new JList();
            public JList getList()
                return list;
            public MouseListener getMouseListener()
                return this;
            public MouseMotionListener getMouseMotionListener()
                return this;
            public KeyListener getKeyListener()
                return null;
            public boolean isVisible()
                return popup.isVisible();
            public void uninstallingUI()
                popup.removePopupMenuListener(this);
            // end ComboPopup method implementations
            //======================================
            //===================================================================
            // begin Event Listeners
            // MouseListener
            public void mousePressed( MouseEvent e )
            // something else registered for MousePressed
            public void mouseClicked(MouseEvent e)
            public void mouseReleased( MouseEvent e )
                if (!SwingUtilities.isLeftMouseButton(e))
                    return;
                if (!comboBox.isEnabled())
                    return;
                if (comboBox.isEditable())
                    comboBox.getEditor().getEditorComponent().requestFocus();
                else
                    comboBox.requestFocus();
                togglePopup();
            protected boolean mouseInside = false;
            public void mouseEntered(MouseEvent e)
                mouseInside = true;
            public void mouseExited(MouseEvent e)
                mouseInside = false;
            // MouseMotionListener
            public void mouseDragged(MouseEvent e)
            public void mouseMoved(MouseEvent e)
            public void keyPressed(KeyEvent e)
                if(e.getSource()==this)
                    if(e.getKeyCode()==KeyEvent.VK_CONTROL)
                        System.out.println("keytyped1");
            public void keyTyped(KeyEvent e)
            public void keyReleased( KeyEvent e )
                if(e.getKeyCode()==KeyEvent.VK_CONTROL)
                    System.out.println("keytyped2");
                if ( e.getKeyCode() == KeyEvent.VK_SPACE || e.getKeyCode() == KeyEvent.VK_ENTER )
                    togglePopup();
             * Variables hideNext and mouseInside are used to
             * hide the popupMenu by clicking the mouse in the JComboBox
            public void popupMenuCanceled(PopupMenuEvent e)
            protected boolean hideNext = false;
            public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
                hideNext = mouseInside;
            public void popupMenuWillBecomeVisible(PopupMenuEvent e)
            // end Event Listeners
            //=================================================================
            //===================================================================
            // begin Utility methods
            protected void togglePopup()
                if( isVisible() || hideNext)
                    hide();
                else
                    show();
                hideNext = false;
            // end Utility methods
            //=================================================================
            // Note *** did not use JButton because Popup closes when pressed
            protected JLabel createUpdateButton(final int field, final int amount)
                final JLabel label = new JLabel();
                final Border selectedBorder = new EtchedBorder();
                final Border unselectedBorder = new EmptyBorder(selectedBorder.getBorderInsets(new JLabel()));
                label.setBorder(unselectedBorder);
                label.setForeground(foreground);
                label.addMouseListener(new MouseAdapter()
                    public void mouseReleased(MouseEvent e)
                        calendar.add(field, amount);
                        updatePopup();
                    public void mouseEntered(MouseEvent e)
                        label.setBorder(selectedBorder);
                    public void mouseExited(MouseEvent e)
                        label.setBorder(unselectedBorder);
                return label;
            protected void initializePopup()
                JPanel header = new JPanel();
                header.setLayout(new BoxLayout(header, BoxLayout.X_AXIS));
                header.setBackground(background);
                header.setOpaque(true);
                JLabel label;
                label = createUpdateButton(Calendar.YEAR, -1);
                label.setText("<<");
                label.setToolTipText("Sidste �r");
                header.add(Box.createHorizontalStrut(12));
                header.add(label);
                header.add(Box.createHorizontalStrut(12));
                label = createUpdateButton(Calendar.MONTH, -1);
                label.setText("< ");
                label.setToolTipText("Sidste m�ned");
                header.add(label);
                monthLabel = new JLabel("", JLabel.CENTER);
                monthLabel.setForeground(foreground);
                header.add(Box.createHorizontalGlue());
                header.add(monthLabel);
                header.add(Box.createHorizontalGlue());
                label = createUpdateButton(Calendar.MONTH, 1);
                label.setText(" >");
                label.setToolTipText("N�ste m�ned");
                header.add(label);
                label = createUpdateButton(Calendar.YEAR, 1);
                label.setText(">>");
                label.setToolTipText("N�ste �r");
                header.add(Box.createHorizontalStrut(12));
                header.add(label);
                header.add(Box.createHorizontalStrut(12));
                popup = new JPopupMenu();
                popup.setBorder(BorderFactory.createLineBorder(Color.black));
                popup.setLayout(new BorderLayout());
                popup.setBackground(background);
                popup.addPopupMenuListener(this);
                popup.add(BorderLayout.NORTH, header);
                popup.getAccessibleContext().setAccessibleParent(comboBox);
            // update the Popup when either the month or the year of the calendar has been changed
            protected void updatePopup()
                monthLabel.setText( monthFormat.format(calendar.getTime()) );
                if (days != null)
                    popup.remove(days);
                days = new JPanel(new GridLayout(0, 7));
                days.setBackground(background);
                days.setOpaque(true);
                Calendar setupCalendar = (Calendar) calendar.clone();
                setupCalendar.set(Calendar.DAY_OF_WEEK, setupCalendar.getFirstDayOfWeek());
                for (int i = 0; i < 7; i++)
                    int dayInt = setupCalendar.get(Calendar.DAY_OF_WEEK);
                    JLabel label = new JLabel();
                    label.setHorizontalAlignment(JLabel.CENTER);
                    label.setForeground(foreground);
                    if (dayInt == Calendar.SUNDAY)
                        label.setText("s�n");
                    else if (dayInt == Calendar.MONDAY)
                        label.setText("man");
                    else if (dayInt == Calendar.TUESDAY)
                        label.setText("tir");
                    else if (dayInt == Calendar.WEDNESDAY)
                        label.setText("ons");
                    else if (dayInt == Calendar.THURSDAY)
                        label.setText("tor");
                    else if (dayInt == Calendar.FRIDAY)
                        label.setText("fre");
                    else if (dayInt == Calendar.SATURDAY)
                        label.setText("l�r");
                    //                days.add(label);
                    setupCalendar.roll(Calendar.DAY_OF_WEEK, true);
                setupCalendar = (Calendar) calendar.clone();
                setupCalendar.set(Calendar.DAY_OF_MONTH, 1);
                int first = setupCalendar.get(Calendar.DAY_OF_WEEK);
                for (int i = 0; i < (first-2) ; i++)
                    days.add(new JLabel(""));
                for (int i = 1; i <= setupCalendar.getActualMaximum(Calendar.DAY_OF_MONTH); i++)
                    final int day = i;
                    final JLabel label = new JLabel(String.valueOf(day));
                    label.setHorizontalAlignment(JLabel.CENTER);
                    label.setForeground(foreground);
                    label.addMouseListener(new MouseAdapter()
                        public void mouseReleased(MouseEvent e)
                            label.setOpaque(false);
                            label.setBackground(background);
                            label.setForeground(foreground);
                            calendar.set(Calendar.DAY_OF_MONTH, day);
                            hide();
                            comboBox.requestFocus();
                            if (tabel.isEditing())
                                tabel.getCellEditor(tabel.getEditingRow(),
                                tabel.getEditingColumn()).stopCellEditing();
                            model.setValueAt(dateFormat.format(calendar.getTime()),raekke,1);
                            tabel.requestFocus();
                        public void mouseEntered(MouseEvent e)
                            label.setOpaque(true);
                            label.setBackground(selectedBackground);
                            label.setForeground(selectedForeground);
                        public void mouseExited(MouseEvent e)
                            label.setOpaque(false);
                            label.setBackground(background);
                            label.setForeground(foreground);
                    days.add(label);
                popup.add(BorderLayout.CENTER, days);
                popup.pack();
            private JComboBox comboBox;
            private Calendar calendar;
            private JPopupMenu popup;
            private JLabel monthLabel;
            private JPanel days = null;
            private SimpleDateFormat monthFormat = new SimpleDateFormat("MMM yyyy");
            //        private int antaldage=1;
            private Color selectedBackground;
            private Color selectedForeground;
            private Color background;
            private Color foreground;
        private SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy");
        private int raekke=-1;
        private DefaultTableModel model;
        private JTable tabel;
    }

    come on help plz....

  • Tab not working properly for Datagrid ItemEditor ComboBox

    When you run the app type a1 in the find an App combo box then hit the tab key.
    Click in the 3rd row in the As Bs column and a combobox will show.
    Type a3 and then hit enter.  Notice that A3 is saved as the selected item and saved to the dataprovider
    Hit the backspace key and hit enter.  Notice that the  null is saved and nothing is selected.
    Type a3 again and hit enter.
    Hit the backspce again but this time hit the tab key.  Notice the previous value is back.  ooops.
    {Code}
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:vo="valueObjects.*"
                   width="100%" height="100%">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.events.FlexEvent;
                protected function aCBLabel(item:Object):String
                    if (item != null)
                        return item.name;
                    else
                        return "";
                protected function bDG_creationCompleteHandler(event:FlexEvent):void
                    bDG.selectedIndex = 0;
                protected function bAFormat(item:Object, column:DataGridColumn):String
                    if (item [column.dataField] != null)
                        return item [column.dataField].name;
                    else
                        return "";
            ]]>
        </fx:Script>
        <fx:Declarations>
            <vo:ADto id="aDto"/>
            <vo:BDto id="bDto"/>
            <s:ArrayCollection id="aList">
                <vo:ADto>
                    <vo:id>1</vo:id>
                    <vo:name>a1</vo:name>
                    <vo:bs>
                        <vo:BDto>
                            <vo:id>1</vo:id>
                            <vo:aDto>
                                <vo:ADto>
                                    <vo:id>1</vo:id>
                                    <vo:name>a1</vo:name>
                                </vo:ADto>
                            </vo:aDto>
                        </vo:BDto>
                        <vo:BDto>
                            <vo:id>2</vo:id>
                            <vo:aDto>
                                <vo:ADto>
                                    <vo:id>2</vo:id>
                                    <vo:name>a2</vo:name>
                                </vo:ADto>
                            </vo:aDto>
                        </vo:BDto>
                        <vo:BDto>
                            <vo:id>0</vo:id>
                        </vo:BDto>
                    </vo:bs>
                </vo:ADto>
                <vo:ADto>
                    <vo:id>2</vo:id>
                    <vo:name>a2</vo:name>
                    <vo:bs>
                        <vo:BDto>
                            <vo:id>3</vo:id>
                            <vo:aDto>
                                <vo:ADto>
                                    <vo:id>3</vo:id>
                                    <vo:name>a3</vo:name>
                                </vo:ADto>
                            </vo:aDto>
                        </vo:BDto>
                        <vo:BDto>
                            <vo:id>0</vo:id>
                        </vo:BDto>
                    </vo:bs>
                </vo:ADto>
            </s:ArrayCollection>
            <s:ArrayCollection id="bAList">
                <vo:ADto>
                    <vo:id>1</vo:id>
                    <vo:name>a1</vo:name>
                </vo:ADto>
                <vo:ADto>
                    <vo:id>2</vo:id>
                    <vo:name>a2</vo:name>
                </vo:ADto>
                <vo:ADto>
                    <vo:id>3</vo:id>
                    <vo:name>a3</vo:name>
                </vo:ADto>
            </s:ArrayCollection>
        </fx:Declarations>
        <fx:Binding source="aCB.selectedItem as ADto" destination="aDto"/>
        <s:Form id="AForm" width="700" height="170">
            <s:layout>
                <s:BasicLayout/>
            </s:layout>
            <s:HGroup x="0" y="50" width="670" height="60">
                <s:Label height="25" fontWeight="bold" text="Find an A" verticalAlign="middle"/>
                <s:ComboBox id='aCB'
                            prompt="Enter or Select an A Name"
                            labelFunction="aCBLabel"
                            x="110" y="10" width="375">
                    <mx:ArrayCollection id="asList" list="{aList}"/>
                </s:ComboBox>
            </s:HGroup>
        </s:Form>
        <mx:DataGrid id="bDG" x="10" y="140" width="450" height="200"
                     editable="true"
                     dataProvider="{aDto.bs}"
                     creationComplete="bDG_creationCompleteHandler(event)">
            <mx:columns>
                <mx:DataGridColumn id="bidDC"
                                   headerText="id"
                                   editable="true"
                                   dataField="id"
                                   editorDataField="value"
                                   width="50"/>
                <mx:DataGridColumn id="bNameDC"
                                   headerText="As Bs"
                                   editable="true"
                                   dataField="aDto"
                                   labelFunction="bAFormat"
                                   editorDataField="value"
                                   width="150">
                    <mx:itemEditor>
                        <fx:Component>
                            <s:MXDataGridItemRenderer implements="mx.managers.IFocusManagerComponent">
                                <fx:Script>
                                    <![CDATA[
                                        import mx.collections.ArrayCollection;
                                        import mx.controls.dataGridClasses.DataGridListData;
                                        import mx.controls.listClasses.BaseListData;
                                        import mx.events.FlexEvent;
                                        import spark.events.DropDownEvent;
                                        import spark.events.IndexChangeEvent;
                                        [Bindable]
                                        public var bAs:ArrayCollection;
                                        protected function cb_InitializeHandler(event:FlexEvent):void
                                            bAs = outerDocument.bAList;
                                            aDto = outerDocument.bDG.selectedItem.aDto;
                                            if (aDto != null)
                                                var t:ADto;
                                                for (var i:int = 0; i<bAs.length; i++)
                                                    t = bAs[i];
                                                    if (aDto.id == t.id)
                                                        cb.selectedIndex = i;
                                                        break;
                                        override public function setFocus():void
                                            cb.setFocus();
                                        public function get value():ADto
                                            if (cb.isDropDownOpen)
                                                cb.closeDropDown(true);
                                            cb.validateNow();
                                            aDto = cb.selectedItem as ADto;
                                            return aDto
                                        protected function cb_closeHandler(event:DropDownEvent):void
                                            aDto = cb.selectedItem as ADto;
                                    ]]>
                                </fx:Script>
                                <fx:Declarations>
                                    <vo:ADto id="aDto"/>
                                    <!-- Place non-visual elements (e.g., services, value objects) here -->
                                </fx:Declarations>
                                <s:ComboBox id="cb"
                                                width = "100%"
                                                prompt="{aDto.name}"
                                                dataProvider="{bAs}"
                                                labelField="name"
                                                initialize="cb_InitializeHandler(event)"
                                                close="cb_closeHandler(event)">
                                </s:ComboBox>
                            </s:MXDataGridItemRenderer>
                        </fx:Component>
                    </mx:itemEditor>
                </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>
    </s:Application>
    {Code}
    {Code}
    package valueObjects
        import com.adobe.fiber.services.IFiberManagingService;
        import com.adobe.fiber.valueobjects.IValueObject;
        import mx.collections.ArrayCollection;
        import valueObjects.BDto;
        import com.adobe.fiber.core.model_internal;
        use namespace model_internal;
        public class ADto implements com.adobe.fiber.valueobjects.IValueObject
            private var _internal_id : int;
            private var _internal_name : String;
            private var _internal_bs : ArrayCollection;
            model_internal var _internal_bs_leaf:valueObjects.BDto;
            public function ADto()
            public function get id() : int
                return _internal_id;
            public function get name() : String
                return _internal_name;
            public function get bs() : ArrayCollection
                return _internal_bs;
            public function set id(value:int) : void
                var oldValue:int = _internal_id;
                if (oldValue !== value)
                    _internal_id = value;
            public function set name(value:String) : void
                var oldValue:String = _internal_name;
                if (oldValue !== value)
                    _internal_name = value;
            public function set bs(value:*) : void
                var oldValue:ArrayCollection = _internal_bs;
                if (oldValue !== value)
                    if (value is ArrayCollection)
                        _internal_bs = value;
                    else if (value is Array)
                        _internal_bs = new ArrayCollection(value);
                    else if (value == null)
                        _internal_bs = null;
                    else
                        throw new Error("value of bs must be a collection");
            private var _managingService:com.adobe.fiber.services.IFiberManagingService;
            public function set managingService(managingService:com.adobe.fiber.services.IFiberManagi ngService):void
                _managingService = managingService;
    {Code}
    {Code}
    package valueObjects
    import com.adobe.fiber.core.model_internal;
    import com.adobe.fiber.services.IFiberManagingService;
    import com.adobe.fiber.valueobjects.IValueObject;
    import valueObjects.ADto;
    import mx.collections.ArrayCollection;
    use namespace model_internal;
    public class BDto implements com.adobe.fiber.valueobjects.IValueObject
        private var _internal_id : int;
        private var _internal_aDto : ADto;
        private static var emptyArray:Array = new Array();
        public function BDto()
            _internal_id = 0;
        public function get id() : int
            return _internal_id;
        public function get aDto() : ADto
            return _internal_aDto;
        public function set id(value:int) : void
            var oldValue:int = _internal_id;
            if (oldValue !== value)
                _internal_id = value;
        public function set aDto(value:ADto) : void
            var oldValue:ADto = _internal_aDto;
            if (oldValue !== value)
                _internal_aDto = value;
        private var _managingService:com.adobe.fiber.services.IFiberManagingService;
        public function set managingService(managingService:com.adobe.fiber.services.IFiberManagi ngService):void
            _managingService = managingService;
    {Code}

    the reason the tab was not working is because it was not changing the selection and just exiting the combo box.  So, in the value function add if (cb.textInput.text == "") cb.selectedIndex = -1;  This will change the selection as desired and fixes the problem.

  • Manually dispatching a keyboard tab event on a form does not work

    Hi,
    I am trying to solve the following issue:
    I have a form that is sitting on a TitleWindow. This is a popup window. I have a TextInput field. After clicking on the TextInput field when I try to paste something on it, nothing happens the first time and it works i.e. I am able to paste when I do a cntrl V the second time (I am trying to solve this weired behavior). When I use the keyboard to tab to the TextInput field I am able to paste using cntrl V  the first time itself.
    Therefore, I am trying to manually dispatch a tab keyboard event on a form using the following code and this does not work. I have 2 TextInput component on the form and I want the cursor to be on the second TextInput component.
    I have a have a key down handler and I can see that the event that comes in is a tab event, but on the UI the cursor does not position itself correctly.
    myForm.setFocus();
    myForm.dispatchEvent(
    new KeyboardEvent(KeyboardEvent.KEY_UP, true, false, Keyboard.TAB,Keyboard.TAB ))
    Am I missing something?
    Appreciate your help.
    Thanks
    Lilly

    No I am not trying to change the text programmatically. I have added a click event handler and a paste event handler on the textinput. I checked the differences in the properties of event and did not see anything that is different.
    I have a hunch that it has something to do with the fact that this form is sitting on a popup window.

  • When my thread starts running, at that time keylistener is not working.

    when my thread starts running, at that time keylistener is not working.
    plz reply me.

    //FrameShow.java
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import java.awt.Dimension;
    import java.awt.geom.Dimension2D;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.util.logging.Level;
    import java.awt.event.*;
    import java.util.*;
    public class FrameShow extends JFrame implements ActionListener,KeyListener
         boolean paused=false;
         JButton stop;
         JButton start;
         JButton exit;
         public IncludePanel CenterPanel;
         public FrameShow()
    CenterPanel= new IncludePanel();
              Functions fn=new Functions();
              int height=fn.getScreenHeight();
              int width=fn.getScreenWidth();
              setTitle("Game Assignment--Santanu Tripathy--MCA");
              setSize(width,height);
              setResizable(false);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              show();
              initComponents();
              DefaultColorSet();
              this.addKeyListener(this);
         this.setFocusable(true);
         public void initComponents()
              Container contentpane=getContentPane();
              //Creating Panel For Different Side
              JPanel EastPanel= new JPanel();
              JPanel WestPanel= new JPanel();
              JPanel NorthPanel= new JPanel();
              JPanel SouthPanel= new JPanel();
              //CenterPanel = new IncludePanel();
              //IncludePanel CenterPanel= new IncludePanel();
              EastPanel.setPreferredSize(new Dimension(100,10));
              WestPanel.setPreferredSize(new Dimension(100,10));
              NorthPanel.setPreferredSize(new Dimension(10,100));
              SouthPanel.setPreferredSize(new Dimension(10,100));
              //CenterPanel.setPreferredSize(new Dimension(200,200));
              //Adding Color to the Panels
              NorthPanel.setBackground(Color.green);
              SouthPanel.setBackground(Color.orange);
              CenterPanel.setBackground(Color.black);
              //Creating Border For Different Side
              Border EastBr = javax.swing.BorderFactory.createEtchedBorder(Color.cyan, Color.red);
              Border WestBr = javax.swing.BorderFactory.createEtchedBorder(Color.cyan, Color.red);
              Border NorthBr = javax.swing.BorderFactory.createEtchedBorder(Color.cyan, Color.red);
              Border SouthBr = javax.swing.BorderFactory.createEtchedBorder(Color.cyan, Color.red);
              Border CenterBr = javax.swing.BorderFactory.createEtchedBorder(Color.cyan, Color.red);
              //Creating Components For East Panel
              JLabel left= new JLabel("LEFT");
              JLabel right= new JLabel("RIGHT");
              JLabel rotate= new JLabel("ROTATE");
              left.setForeground(Color.blue);
              right.setForeground(Color.blue);
              rotate.setForeground(Color.blue);
              //Creating Components For West Panel
              ButtonGroup group = new ButtonGroup();
              JRadioButton rb1 = new JRadioButton("Pink",false);
              JRadioButton rb2 = new JRadioButton("Cyan",false);
              JRadioButton rb3 = new JRadioButton("Orange",false);
              JRadioButton _default = new JRadioButton("Black",true);
              rb1.setForeground(Color.pink);
              rb2.setForeground(Color.cyan);
              rb3.setForeground(Color.orange);
              _default.setForeground(Color.black);
              //Creating Components For North Panel
              JLabel name= new JLabel("Santanu Tripathy");
              name.setForeground(Color.blue);
              name.setFont(new Font("Serif",Font.BOLD,30));
              //Creating Components For South Panel
              start = new JButton();
              stop = new JButton();
              exit = new JButton();
              start.setToolTipText("Click this button to start the game");
              start.setFont(new java.awt.Font("Trebuchet MS", 0, 12));
              start.setText("START");
              start.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEmptyBorder(3, 5, 3, 5), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
              start.setMaximumSize(new java.awt.Dimension(90, 35));
              start.setMinimumSize(new java.awt.Dimension(90, 35));
              start.setPreferredSize(new java.awt.Dimension(95, 35));
              if(paused)
                   stop.setToolTipText("Click this button to pause the game");
              else
                   stop.setToolTipText("Click this button to resume the game");
              stop.setFont(new java.awt.Font("Trebuchet MS", 0, 12));
              stop.setText("PAUSE");
              stop.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEmptyBorder(3, 5, 3, 5), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
              stop.setMaximumSize(new java.awt.Dimension(90, 35));
              stop.setMinimumSize(new java.awt.Dimension(90, 35));
              stop.setPreferredSize(new java.awt.Dimension(95, 35));
              exit.setToolTipText("Click this button to exit from the game");
              exit.setFont(new java.awt.Font("Trebuchet MS", 0, 12));
              exit.setText("EXIT");
              exit.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEmptyBorder(3, 5, 3, 5), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)));
              exit.setMaximumSize(new java.awt.Dimension(90, 35));
              exit.setMinimumSize(new java.awt.Dimension(90, 35));
              exit.setPreferredSize(new java.awt.Dimension(95, 35));
              //Adding some extra things to the Panels
              group.add(rb1);
              group.add(rb2);
              group.add(rb3);
              group.add(_default);
              //Adding Component into the Panels
              EastPanel.add(left);
              EastPanel.add(right);
              EastPanel.add(rotate);
              WestPanel.add(rb1);
              WestPanel.add(rb2);
              WestPanel.add(rb3);
              WestPanel.add(_default);
              NorthPanel.add(name);
              SouthPanel.add(start);
              SouthPanel.add(stop);
              SouthPanel.add(exit);
              //Adding Border Into the Panels
              EastPanel.setBorder(EastBr);
              WestPanel.setBorder(WestBr);
              NorthPanel.setBorder(NorthBr);
              SouthPanel.setBorder(SouthBr);
              CenterPanel.setBorder(CenterBr);
              //Adding Panels into the Container
              EastPanel.setLayout(new GridLayout(0,1));
              contentpane.add(EastPanel,BorderLayout.EAST);
              WestPanel.setLayout(new GridLayout(0,1));
              contentpane.add(WestPanel,BorderLayout.WEST);
              contentpane.add(NorthPanel,BorderLayout.NORTH);
              contentpane.add(SouthPanel,BorderLayout.SOUTH);
              contentpane.add(CenterPanel,BorderLayout.CENTER);
              //Adding Action Listeners
              rb1.addActionListener(this);
              rb2.addActionListener(this);
              rb3.addActionListener(this);
              _default.addActionListener(this);
              exit.addActionListener(this);
              start.addActionListener(this);
    try
              start.addActionListener(
    new ActionListener() {
    public void actionPerformed( ActionEvent e )
                        start.setEnabled(false);
    CenterPanel.drawCircle();
    catch(Exception e)
    {System.out.println("Exception is attached with sart button exp = "+e);}
    try
              stop.addActionListener(
    new ActionListener() {
    public void actionPerformed( ActionEvent e )
                        paused=!paused;
                        if(paused)
                             start.setToolTipText("Click this button to resume the game");
                             stop.setText("RESUME");
                        else
                             start.setToolTipText("Click this button to pause the game");
                             stop.setText("PAUSE");
    CenterPanel.pause();
    catch(Exception e)
    {System.out.println("Exception is attached with sart button exp = "+e);}
         public void DefaultColorSet()
              getContentPane().setBackground(Color.white);
         public void actionPerformed(ActionEvent AE)
              String str=(String)AE.getActionCommand();
              if(str.equalsIgnoreCase("pink"))
                   CenterPanel.setBackground(Color.pink);
              if(str.equalsIgnoreCase("cyan"))
                   CenterPanel.setBackground(Color.cyan);
              if(str.equalsIgnoreCase("orange"))
                   CenterPanel.setBackground(Color.orange);
              if(str.equalsIgnoreCase("black"))
                   CenterPanel.setBackground(Color.black);
              if(str.equalsIgnoreCase("exit"))
                   System.exit(0);
         public void keyTyped(KeyEvent kevt)
    //repaint();
    public void keyPressed(KeyEvent e)
              System.out.println("here key pressed");
              //CenterPanel.dec();
         public void keyReleased(KeyEvent ke) {}
    }//End of FrameShow.ja
    //IncludePanel.java
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.awt.Graphics.*;
    import java.awt.Dimension;
    import java.awt.geom.Dimension2D;
    import java.util.*;
    import java.util.logging.Level;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    public class IncludePanel extends JPanel implements Runnable
    int x=0,y=0;
    int color_1=0;
    int color_2=1;
    int start=0;
    Thread th;
    Image red,blue,green,yellow;
    java.util.List image;
    static boolean PAUSE=false;
         public IncludePanel()
         red= Toolkit.getDefaultToolkit().getImage("red.png");
         blue= Toolkit.getDefaultToolkit().getImage("blue.png");
         green= Toolkit.getDefaultToolkit().getImage("green.png");
         yellow= Toolkit.getDefaultToolkit().getImage("yellow.png");
    public void paintComponent(Graphics g)
              super.paintComponent(g);
              draw(g);
    public void dec()
         System.out.println("in dec method");
         x=x+30;
    public void draw(Graphics g)
              g.setColor(Color.red);
              int xx=0,yy=0;
              for (int row=0;row<=12;row++)
                   g.drawLine(xx,yy,180,yy);
                   yy=yy+30;
              xx=0;
              yy=0;
              for (int col=0;col<=6;col++)
                   g.drawLine(xx,yy,xx,360);
                   xx=xx+30;
              if(color_1==0)
                   g.drawImage(red, x, y, this);
              else if(color_1==1)
                   g.drawImage(blue,x, y, this);
              else if(color_1==2)
                   g.drawImage(green,x,y, this);
              else if(color_1==3)
                   g.drawImage(yellow,x,y, this);
    x=x+30;
              if(color_2==0)
                   g.drawImage(red, x, y, this);
              else if(color_2==1)
                   g.drawImage(blue,x,y, this);
              else if(color_2==2)
                   g.drawImage(green,x,y, this);
              else if(color_2==3)
                   g.drawImage(yellow,x,y, this);
    x=0;
    public void drawCircle( )
         th=new Thread(this);
         th.start();
         public void pause()
              if(PAUSE)
                   th.resume();
                   PAUSE=false;
                   return;
              if(!PAUSE)
              PAUSE=true;
         public synchronized void run()
              Random rand = new Random();
              Thread ani=Thread.currentThread();
              while(ani==th)
                   if(PAUSE)
                        th.suspend();
                   if(y==330)
                        color_1 = Math.abs(rand.nextInt())%4;
                        color_2 = Math.abs(rand.nextInt())%4;
                        if(color_1==color_2)
                             color_2=(color_2+1)%4;
                        y=0;
                   else
                        y=y+30;
                   repaint();
                   try
                        Thread.sleep(700);
                   catch(Exception e)
         }//End of run
    i sent two entire program

  • Help, my tab order will not work? Tried to troubleshoot, no luck!

    I created a form used the manual tab order and it would not work. I adjusted the hierarchy and erased all the traversal's in the XML. The tabbing order is now automatic but still out of order pretty badly. Can someone please guide me in the right direction. I really want this form to be over with.

    Hope you considered following point.....When you set the Tab order you set the order starting 1 to n with in each subform. Setting taborder across the subforms is not an option at least in LC 7 and 8. However there is workaround for this, using setFocus() method.... look more in the help.
    Example: xfa.host.setFocus("xfa.form.form1.TextField1");
    If you still have difficulty attach a copy of your template and explain in detail what you try to do.

  • Not work tablet UI on Prestigio 5080 PRO tablet

    I read that browser.ui.layout.tablet = "1" can fix this problem. But it not works. I can work only in pnone interface that is not good for my 8'' tablet.

    Would it be possible for you to share the problematic pdf and OS information  with us at [email protected] so that we may investigate?
    Thanks,
    Adobe Reader Team

  • Why self-defined access sequences of free goods can not work?

    Hi gurus,
    I have maintained access sequences of free goods self-defined.but when i creat the SO it does not work!
    when i used the standard access sequences ,it is OK .
    Can anybody tell me why?
    thanks in advance

    Dear Sandy,
    Go to V/N1 transaction select your self defined access sequence then go in to the accesses and fields and check all fields are activated.
    Make sure that these fields are flowing in your sales order.
    I hope this will help you,
    Regards,
    Murali.

  • Adobe bridge raw not working with windows vista in photoshop cc, why?

    adobe bridge raw not working in photoshop cc, is there a fix?

    Your sure your using photoshop cc on windows vista?
    I was under the impression that photoshop cc would not even install on windows vista.
    What version of camera raw do you have?
    In photoshop under Help>About Plugin does it list Camera Raw and if so which version is it?
    (click on the words Camera Raw to see the version)
    Camera raw doesn't work if it's a camera raw file or some other file type such as jpeg or tif?
    What camera are the camera raw files from?
    Officially camera raw 8.3 is the latest version of camera raw that will work on windows vista.

  • Adobe Bridge CS5 in windows 7 not working?

    Adobe Bridge CS5 in windows 7 not working. I was using bridge perfectly for last 2 years. It stops working since 3 days. I tried to install updates. Showing some error to install.
    Tried to install creative cloud..again some error. Error code : 82
    Could you please advice how I can fix my adobe bridge.

    https://www.youtube.com/watch?v=xDYpTOoV81Q&feature=youtu.be
    please check this video I uploaded..this is what happens when I click adobe bridge.. just blinks and go off. bridge not working on task manager

  • ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW

    ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW

    BLANK Cloud Screen http://forums.adobe.com/message/5484303 may help
    -and step by step http://forums.adobe.com/thread/1440508?tstart=0
    -and http://helpx.adobe.com/creative-cloud/kb/blank-white-screen-ccp.html

  • Partner application logoff not working

    We have a partner application registered with sso with custom login screen. The login works fine. We use the following code to logoff the partner application in logoff.jsp
    response.setHeader("Osso-Return-Url", "http://my.oracle.com" );
    response.sendError(470, "Oracle SSO");
    session.invalidate();
    but the logoff is not working properly. It is not invalidating the session and the logout http request is not going from the application server to the sso server.
    Are there any additional configurations for SSO logoff.Any help is appreciated.
    Thanks

    Hi
    The WF should also trigger if i add the Partner function in UI.If i change any Attribute the WF triggers but i dont want to change the attribute when i add the partner function.
    If i have only one event for WF that is Partner Change the WF will not trigger it for the 1st time when i save the UI. But next i come to the same saved doc and add a partner function then the Wf triggers.
    So this means that Partner change is active.
    the issue here is i need to trigger the WF on , the 1st time i save the UI, for which i wil be using Attribute Change and next time when i come back to saved doc the and add only the partner function and no changes are made to attributes the WF should again trigger.
    Thanks
    Tarmeem

Maybe you are looking for

  • Attaching a search help to a selection screen "Select-options"

    Hello ABAPers, I have  a requirement to attach a search help to "select-options" . When I checked the table corresponding to the field of select-options,I found that there is no search help assigned for that field. I have tried using AT Selection-scr

  • I lose my contact in my iphone. How can I get my contact from my back up in my Itunes

    I lose my contact in my iphone? How can I get my contact from my itunes which I was sync last month?

  • IDOC bad data transfer to XI

    hi. I have a problem. sender system send an IDOC to XI. when I check the IDOC in WE02 found that one of fields of the idoc have a "#" (Torre B1 - B#Unimev). When XI recive the IDOC with XML format the "#" character is transformer to " "(Torre B1 - B

  • Third party plant

    Hi All, Of late, I heard a term "Third party plant". What is meant by "Third party plant"? Is it a word to refer our consignment vendor? Kindly clarify. Regards, Raja Durai

  • How to add Multimedia Keyboard Shortcuts

    Brand new to mac/apple... I use a wireless keyboard and mouse and want to use the multimedia keys on this keyboard. How do i add keyboard shortcuts in 10.5.5?