Flex events, priorities and threads

Hello,
I have been reading from several places that flex is entirely single threaded, that two pieces of code will never be executed concurently, even when using timer events, and so on...
On the other hand, http://livedocs.adobe.com/flex/3/html/help.html?content=events_09.html says:
Even if you give a listener a higher priority than other listeners,
there is no way to guarantee that the listener will finish executing
before the next listener is called. You should ensure that listeners do
not rely on other listeners completing execution before calling the
next listener. It is important to understand that Flash Player does not
necessarily wait until the first event listener finishes processing
before proceeding with the next one.
Could someone explain how a listener can be called "before the previous listener is finished", if the statement regarding single threading is true???
I am running into a very nasty bug that I can't explain unless I have a race condition between two functions accessing the same ressource inside events. It is really looking like event callbacks are executed in separated treads, which would be consitent with Adobe doc about events and priorities.
Thank you in advance for any hint...
Pierre

Sure it helps.  It means that a whole class of possible causes has been
eliminated.
Anyway, describe your problem in more detail.  Keep in mind that while you
don't have to worry about concurrency issues, you do have to worry about
asynchronicity issues.  Network calls, for example, are asynchronous, which
means that they do not block the UI, and their event handlers will run
later, when the response returns (but it won't interrupt other actionscript
processing).  I don't believe that responses are guaranteed to return in the
order requested and that can cause your code to run in a different order
than expected.

Similar Messages

  • Documenting Events and Threads

    Does anyone have any thoughts on how to show multiple threads and events on
    an object interaction diagram?
    Specifically, the OID shows one vertical line per object, and shows a
    method invocation as a horizontal connection between two objects. How do
    you show event Posts and waiting for events on the diagram? and how would
    you show an asynchronous call to a task?
    Thanks
    -Nabil
    ==================================================
    Nabil Hijazi Optimum Solutions, Inc.
    [email protected] 11654 Plaza America Drive
    Phone: (703) 435-3530 #501
    Fax: (703) 435-9212 Reston, Va 20190
    --------------------------------------------------

    Does anyone have any thoughts on how to show multiple threads and events on
    an object interaction diagram?
    Specifically, the OID shows one vertical line per object, and shows a
    method invocation as a horizontal connection between two objects. How do
    you show event Posts and waiting for events on the diagram? and how would
    you show an asynchronous call to a task?
    Thanks
    -Nabil
    ==================================================
    Nabil Hijazi Optimum Solutions, Inc.
    [email protected] 11654 Plaza America Drive
    Phone: (703) 435-3530 #501
    Fax: (703) 435-9212 Reston, Va 20190
    --------------------------------------------------

  • Implementing sockets and threads in a jframe gui program

    Hi, I am trying to find a solution to a problem I am having designing my instant messenger application.
    I am creating listening sockets and threads for each client logged into the system. i want to know if there is a way to listen to other clients request from the main gui and then if another client tries to establish a connection with me for example, a thread is created for that client and then my chat gui opens automatically has soon has the other client sends his or hers first text message to me.
    I am relatively new at socket programming has I am currently studying along this area. I know how to create threads and sockets but I am having trouble finding out a solution to my problem. Here is the code that I have done so far for the listening method from my main gui, and the thread class of what I have done so far.
    listening socket:
         private void listeningSocket()
                ServerSocket serverSocket = null;
                boolean listening = true;
                try
                    //listen in port 4444;
                    serverSocket = new ServerSocket(4444);
                catch(IOException x)
                    JOptionPane.showMessageDialog(null, "cannot listen to port 4444", null, JOptionPane.ERROR_MESSAGE);
                while(listening)
                    client_thread w;
                    try
                       w = new client_thread(serverSocket.accept(), jTextArea1);
                       Thread t = new Thread(w);
                       t.start();
                    catch(IOException x)
                         JOptionPane.showMessageDialog(null, "error, cannot start new thread", null, JOptionPane.ERROR_MESSAGE);
            }thread class:
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    import java.sql.*;
    import java.awt.event.*;
    * @author jonathan
    public class client_thread extends Thread
         //define new socket object
        private Socket client_user = null;
        private JTextArea textArea;
        public client_thread(Socket client_user, JTextArea textArea)
            this.client_user = client_user;
            this.textArea = textArea;
        public void run()
            BufferedReader in = null;
            PrintWriter out = null;
            String error = "error has occured, messege was not sent";
            String messege = null;
             try
                //create input and output streams
                in = new BufferedReader(new InputStreamReader (client_user.getInputStream()));
                out = new PrintWriter(client_user.getOutputStream(), true);
                while(true)
                   //read messege sent by user
                   messege = in.readLine();
                    //display messege in textfield
                   out.println(messege);
                   textArea.append(messege);
            catch (IOException e)
                //error messege
                JOptionPane.showMessageDialog(null, error, null, JOptionPane.ERROR_MESSAGE);
    }

    Seems like all you need to do is create a new dialog for each socket that is established. Your current design looks like it will attempt to use the same textarea for all the sockets.
    I would say in your thread class do the following:
    MyConversationDialog dialog = new MyConversationDialog();
    while(true)
                   //read messege sent by user
                   messege = in.readLine();
                    //display messege in textfield
                   out.println(messege);
                   dialog.setVisible (true);
                   dialog.addMessage (message);
                }

  • Event handling and jeditor

    HI, I am having a problem and tied down just because of this.
    I have an action listener code that is executed when button is clicked, and here what i do in that
    JeditorPane.setPage(URL url)
    callToMethod2();
    Method2
    some calculation
    and when i check the length of the document for the jeditorPane it gives me 0
    this is because the page is not yet laoded as it contains images.
    Actually i want this method2 to be called after whole pages is loaded and displayed
    How can i do this
    regards

    API:
    If the document is loaded asynchronously, the document will be installed into the editor immediately using a call to setDocument which will fire a document property change event, then a thread will be created which will begin doing the actual loading. In this case, the page property change event will not be fired by the call to this method directly, but rather will be fired when the thread doing the loading has finished. It will also be fired on the event-dispatch thread. Since the calling thread can not throw an IOException in the event of failure on the other thread, the page property change event will be fired when the other thread is done whether the load was successful or not.
    So, don't put your call to method2 after the setPage. Rather, attach a property change listener for "page" to get the event described above, and in the propertyChange method, call method2. See if that works for you.
    -JBoeing

  • Thumbnail corruption in Events library and timeline

    I am seeing thumbnail corruption in my events library and timeline.  Several thumbnails of jpg images that I imported into the library are showing up as corrupted - color bands and whatnot.  When dragged to the timeline the same thing.  But when I play them in a storyline, everything is ok.  I can ignore it but has anyone else experienced this issue.  I am using 10.0.3 on a MacPro running Lion.

    Hi Tom, Thank you for your reply. Please forgive my ignorance. I did try to find the answer here but I am new at this.  Could you direct me to that thread please? Yes the external hard drive is used for time machine and I did see something at one time regarding an issue but evidently it didnt sink in or stick. The drive is a g-raid I have had for several years used on a macbook pro but now I have a new imac and fcpx. works fine with all other apps, when the drive came out of the box it said preformatted and just ran with it.

  • RMI, event handling, and Winow.dispose()

    Hi all,
    If you combine RMI with an event handler and java.awt.Window.dispose(), the JVM hangs. The only way to solve this problem is by disposing of the frame from within SwingUtilities.invokeLater.
    Please check the following code:
    ServerInterface.java:_
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface ServerInterface extends Remote {
        void Send(ClientInterface CI) throws RemoteException;
    ClientInterface.java:_
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface ClientInterface extends Remote {
        void Send() throws RemoteException;
    Server.java:_
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    import java.rmi.Naming;
    public class Server extends UnicastRemoteObject implements ServerInterface {
    public Server() throws RemoteException {}
    public void Send (ClientInterface CI)
    try { CI.Send(); } catch (Throwable t){System.out.println(t);}
    public static void main(String args[])
    try {
          Naming.rebind      ( "rmi://localhost:1099/Testing",new Server() );
          System.err.println ("Server ready");
    catch ( Throwable t )
            System.out.println ( t );
    Client.java:_
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    import java.rmi.Naming;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.SwingUtilities;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JButton;
    public class Client extends UnicastRemoteObject implements ClientInterface,ActionListener {
    static JFrame A=null;
    static ServerInterface ServerSide;
    private Client()  throws RemoteException {}
    public void Send()
    if ( A == null )
         A = Display("Remove");                   // display frame
    else                                // remove frame
         SwingUtilities.invokeLater ( new Runnable(){public void run(){A.dispose();A=null;}} );
    public static void main(String[] args)
    try {
          ServerSide = (ServerInterface) Naming.lookup ( "rmi://localhost:1099/Testing" );
          ServerSide.Send(new Client());
    catch ( Throwable t )
            System.out.println ( t );
    public void actionPerformed(ActionEvent e)
    try { ServerSide.Send(new Client()); } catch (Throwable t){System.out.println(t);}
    private JFrame Display (String label)
    JButton b = new JButton (label);
    b.addActionListener(this);
    JPanel p = new JPanel ();
    p.add (b);
    JFrame frame = new JFrame ();
    frame.getContentPane().add(p);
    frame.pack();
    frame.setVisible(true);
    return frame;
    }You can do any GUI work from within an event handler, only when you try to dispose of a frame, the system hangs !!!

    Thank you for responding to my problem.
    unless their documentation says otherwise (eg: repaint). I checked the API for "repaint()", but it didn't mention anything about the EDT. What documentation you are referring to ?
    What I don't understand is that why "dispose()" works well on non-RMI systems and hangs the machine on RMI systems ? It even works fine on RMI system providing that you are not disposing of the frame from within an event handler. So the problem occurs only if you are combining the three elements: RMI, event handler, and dispose().
    Conversely, you should avoid doing anything that may take a long time on the EDT. Perhaps remote methods fall into that category.It is true that we should avoid doing anything that may take a long time on the EDT; however, in this particular example, dispose() is not done through a remote call, it is done on the client where the frame should be removed.
    I also tried disposing of the frame from within a normal Thread (instead of the EDT), and it worked just fine.

  • How to deal with the mouse events when the thread is running

    Hi everybody,
    I have a problem with my program.
    Now I want to present a picture for some time in the Canvas,then automatically clear the screen, but when the user press the mousebutton or keybutton, I want to stop the thread and clear the screen.
    How can I receive the mouse event when the thread is running?
    Thanks,

    I use my code in a GUI applet.
    I try to use the code tag, it's the first time.
                   Image im=sd.getStimulus(obj);
                   if(pos==null){
                        g.drawImage(im, (w-im.getWidth(null))/2,(h-im.getHeight(null))/2,null);
                   }else{
                        g.drawImage(im, pos.x,pos.y,pos.w,pos.h,null);
                   try{
                        sleep(showtime);
    //                    Thread.sleep(showtime);
                   }catch(InterruptedException e){}
                   if(pos==null){
                        g.clearRect((w-im.getWidth(null))/2,(h-im.getHeight(null))/2,im.getWidth(null),im.getHeight(null));
                   }else{
                        g.clearRect(pos.x,pos.y, pos.w, pos.h);
                   }

  • Exchange 2007 Event 9335 and 9331 when updating OAB

    I noticed that the GAL is not updating for most users, unless that are not in cached mode. 
    I checked the application log and I am getting these two errors: 9335 and 9331
    Here are the result from [PS] >get-publicfolder -Identity "\NON_IPM_SUBTREE\offline address book" -Recurse |fl:
    Any ideas?
    AgeLimit                       :
    EntryId                        : 000000001A447390AA6611CD9BC
                                     8269BF84FD2044826B78810D8D8
    HasSubFolders                  : True
    HiddenFromAddressListsEnabled  : True
    IssueWarningQuota              : 3991680KB (InheritFromDB)
    LocalReplicaAgeLimit           :
    MailEnabled                    : False
    MaxItemSize                    : 20240KB (InheritFromDB)
    Name                           : OFFLINE ADDRESS BOOK
    ParentPath                     : \NON_IPM_SUBTREE
    PerUserReadStateEnabled        : True
    ProhibitPostQuota              : 4097152KB (InheritFromDB)
    Replicas                       : {}
    ReplicationSchedule            : {}
    RetainDeletedItemsFor          :
    UseDatabaseAgeDefaults         : True
    UseDatabaseQuotaDefaults       : True
    UseDatabaseReplicationSchedule : True
    UseDatabaseRetentionDefaults   : True
    Identity                       : \NON_IPM_SUBTREE\OFFLINE AD
    IsValid                        : True
    OriginatingServer              : myserver
    AgeLimit                       :
    EntryId                        : 000000001A447390AA6611CD9BC
                                     801FB1C124FC44B786136B51DB6
    HasSubFolders                  : True
    HiddenFromAddressListsEnabled  : True
    IssueWarningQuota              : 3991680KB (InheritFromDB)
    LocalReplicaAgeLimit           :
    MailEnabled                    : False
    MaxItemSize                    : 20240KB (InheritFromDB)
    Name                           : /o=Insurors/cn=addrlists/cn
                                     fline Address List
    ParentPath                     : \NON_IPM_SUBTREE\OFFLINE AD
    PerUserReadStateEnabled        : True
    ProhibitPostQuota              : 4097152KB (InheritFromDB)
    Replicas                       : {server3\Second Storage Group\
                                     ase}
    ReplicationSchedule            : {Sun.12:00 AM-Sat.11:45 PM,
                                     2:00 AM}
    RetainDeletedItemsFor          :
    UseDatabaseAgeDefaults         : True
    UseDatabaseQuotaDefaults       : True
    UseDatabaseReplicationSchedule : False
    UseDatabaseRetentionDefaults   : True
    Identity                       : \NON_IPM_SUBTREE\OFFLINE AD
                                     ors/cn=addrlists/cn=oabs/cn
                                     dress List
    IsValid                        : True
    OriginatingServer              : myserver
    AgeLimit                       : 30.00:00:00
    EntryId                        : 000000001A447390AA6611CD9BC
                                     CF1A7D814C0343AA0D65D99F684
    HasSubFolders                  : False
    HiddenFromAddressListsEnabled  : True
    IssueWarningQuota              : 3991680KB (InheritFromDB)
    LocalReplicaAgeLimit           :
    MailEnabled                    : False
    MaxItemSize                    : 20240KB (InheritFromDB)
    Name                           : OAB Version 2
    ParentPath                     : \NON_IPM_SUBTREE\OFFLINE AD
                                     ors/cn=addrlists/cn=oabs/cn
                                     dress List
    PerUserReadStateEnabled        : True
    ProhibitPostQuota              : 4097152KB (InheritFromDB)
    Replicas                       : {server2\First Storage Group\P
                                     (server2)}
    ReplicationSchedule            : {}
    RetainDeletedItemsFor          :
    UseDatabaseAgeDefaults         : False
    UseDatabaseQuotaDefaults       : True
    UseDatabaseReplicationSchedule : True
    UseDatabaseRetentionDefaults   : True
    Identity                       : \NON_IPM_SUBTREE\OFFLINE AD
                                     ors/cn=addrlists/cn=oabs/cn
                                     dress List\OAB Version 2
    IsValid                        : True
    OriginatingServer              : myserver3
    AgeLimit                       : 30.00:00:00
    EntryId                        : 000000001A447390AA6611CD9BC
                                     A8A87846FD2749B82D29502357E
    HasSubFolders                  : False
    HiddenFromAddressListsEnabled  : True
    IssueWarningQuota              : 3991680KB (InheritFromDB)
    LocalReplicaAgeLimit           :
    MailEnabled                    : False
    MaxItemSize                    : 20240KB (InheritFromDB)
    Name                           : OAB Version 3a
    ParentPath                     : \NON_IPM_SUBTREE\OFFLINE AD
                                     ors/cn=addrlists/cn=oabs/cn
                                     dress List
    PerUserReadStateEnabled        : True
    ProhibitPostQuota              : 4097152KB (InheritFromDB)
    Replicas                       : {server2\First Storage Group\P
                                     (server2)}
    ReplicationSchedule            : {}
    RetainDeletedItemsFor          :
    UseDatabaseAgeDefaults         : False
    UseDatabaseQuotaDefaults       : True
    UseDatabaseReplicationSchedule : True
    UseDatabaseRetentionDefaults   : True
    Identity                       : \NON_IPM_SUBTREE\OFFLINE AD
                                     ors/cn=addrlists/cn=oabs/cn
                                     dress List\OAB Version 3a
    IsValid                        : True
    OriginatingServer              : myserver3
    AgeLimit                       : 30.00:00:00
    EntryId                        : 000000001A447390AA6611CD9BC
                                     A8A87846FD2749B82D29502357E
    HasSubFolders                  : False
    HiddenFromAddressListsEnabled  : True
    IssueWarningQuota              : 3991680KB (InheritFromDB)
    LocalReplicaAgeLimit           :
    MailEnabled                    : False
    MaxItemSize                    : 20240KB (InheritFromDB)
    Name                           : OAB Version 4
    ParentPath                     : \NON_IPM_SUBTREE\OFFLINE AD
                                     ors/cn=addrlists/cn=oabs/cn
                                     dress List
    PerUserReadStateEnabled        : True
    ProhibitPostQuota              : 4097152KB (InheritFromDB)
    Replicas                       : {server2\First Storage Group\P
                                     (server2)}
    ReplicationSchedule            : {}
    RetainDeletedItemsFor          :
    UseDatabaseAgeDefaults         : False
    UseDatabaseQuotaDefaults       : True
    UseDatabaseReplicationSchedule : True
    UseDatabaseRetentionDefaults   : True
    Identity                       : \NON_IPM_SUBTREE\OFFLINE AD
                                     ors/cn=addrlists/cn=oabs/cn
                                     dress List\OAB Version 4
    IsValid                        : True
    OriginatingServer              : myserver3
    AgeLimit                       :
    EntryId                        : 000000001A447390AA6611CD9BC
                                     BE78338249B94CADFE01EE01DCE
    HasSubFolders                  : False
    HiddenFromAddressListsEnabled  : True
    IssueWarningQuota              : 3991680KB (InheritFromDB)
    LocalReplicaAgeLimit           :
    MailEnabled                    : False
    MaxItemSize                    : 20240KB (InheritFromDB)
    Name                           : EX:/o=mycompany/ou=Exchange
                                     p (FYDIBOHF23SPDLT)
    ParentPath                     : \NON_IPM_SUBTREE\OFFLINE AD
    PerUserReadStateEnabled        : True
    ProhibitPostQuota              : 4097152KB (InheritFromDB)
    Replicas                       : {server3\Second Storage Group\
                                     ase}
    ReplicationSchedule            : {}
    RetainDeletedItemsFor          :
    UseDatabaseAgeDefaults         : True
    UseDatabaseQuotaDefaults       : True
    UseDatabaseReplicationSchedule : True
    UseDatabaseRetentionDefaults   : True
    Identity                       : \NON_IPM_SUBTREE\OFFLINE AD
                                     mycompany/ou=Exchange Administ
                                     OHF23SPDLT)
    IsValid                        : True
    OriginatingServer              : myserver
    AgeLimit                       :
    EntryId                        : 000000001A447390AA6611CD9BC
                                     F83E8EC1C848EE8B85478979F4D
    HasSubFolders                  : False
    HiddenFromAddressListsEnabled  : True
    IssueWarningQuota              : 3991680KB (InheritFromDB)
    LocalReplicaAgeLimit           :
    MailEnabled                    : False
    MaxItemSize                    : 20240KB (InheritFromDB)
    Name                           : EX:/o=mycompany/ou=First Adm
    ParentPath                     : \NON_IPM_SUBTREE\OFFLINE AD
    PerUserReadStateEnabled        : True
    ProhibitPostQuota              : 4097152KB (InheritFromDB)
    Replicas                       : {server2\First Storage Group\P
                                     (server2)}
    ReplicationSchedule            : {}
    RetainDeletedItemsFor          :
    UseDatabaseAgeDefaults         : True
    UseDatabaseQuotaDefaults       : True
    UseDatabaseReplicationSchedule : True
    UseDatabaseRetentionDefaults   : True
    Identity                       : \NON_IPM_SUBTREE\OFFLINE AD
                                     mycompany/ou=First Administrat
    IsValid                        : True
    OriginatingServer              : myserver

    Hi,
    About the Event 9331 and 9335, the two events error indicate that OALGen experienced an error when it tried to generate the offline address list specified in the event description or clean the offline address list system folders.
    I recommend you refer to the following similar thread to check the result.
    Exchange 07 Event ID 9331 & 9335 when Gen OAB
    http://social.technet.microsoft.com/Forums/en-US/e8431dad-fa2b-4a79-af69-64ac9a5f3059/exchange-07-event-id-9331-9335-when-gen-oab?forum=exchangesvrdeploylegacy
    If the issue persists, please restart the MS Exchange System Attendant and File Distribution service and then update OAB to check the result.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Example of WAIT and CONTINUE using checkBox and thread and getTreeLock()

    I had so much trouble with this that I descided to
    post if incase it helps someone else
    // Swing Applet example of WAIT and CONTINUE using checkBox and thread and getTreeLock()
    // Runs form dos window
    // When START button is pressed program increments x and displys it as a JLabel
    // When checkBox WAIT is ticked program waits.
    // When checkBox WAIT is unticked program continues.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    public class Wc extends JApplet {
    Display canvas;//drawing surface is displayed.
    Box buttonPanel;
    Box msgArea;
    public static JButton button[] = new JButton [2];
    public static JCheckBox checkBox[] = new JCheckBox[2];
    public static JLabel msg[] = new JLabel [2];
    String[] buttonDesc ={"Start","Quit"};
    public static final int buttonStart = 0;
    public static final int buttonQuit = 1;
    String[] checkBoxDesc ={"Wait"};     
    public static final int checkBoxWait = 0;
    public boolean wait;
    public Graphics g;
    //================================================================
    public static void main(String[] args){
    Frame f = new Frame();
    JApplet a = new Wc();
    f.add(a, "Center"); // Add applet to window
    a.init(); // Initialize the applet
    f.setSize(300,100); // Set the size of the window
    f.show(); // Make the window visible
    f.addWindowListener(
    new WindowAdapter(){
    public void windowClosing(WindowEvent e){System.exit(0);}
    }// end main
    //===================================================
    public void init() {
    canvas = new Display();
    setBackground(Color.black);
    getContentPane().setLayout(new BorderLayout(3,3));
    getContentPane().add(canvas, BorderLayout.CENTER);
    buttonPanel = Box.createHorizontalBox();
    getContentPane().add(buttonPanel, BorderLayout.NORTH);
    int sbZ;
    // add button
    button[0] = new JButton(buttonDesc[0]);
    button[0].addActionListener(canvas);
    buttonPanel.add(button[0]);
    button[1] = new JButton(buttonDesc[1]);
    button[1].addActionListener(canvas);
    buttonPanel.add(button[1]);
    // add checkBox
    sbZ=0;
    checkBox[sbZ]=new JCheckBox(checkBoxDesc[sbZ]);
    checkBox[sbZ].setBackground(Color.white);
    checkBox[sbZ].setOpaque(true);
    checkBox[sbZ].addActionListener(canvas);
    buttonPanel.add(checkBox[sbZ]);
    msgArea = Box.createVerticalBox(); // add message
    sbZ=0;
    msg[sbZ]=new JLabel("1",JLabel.LEFT);
    msg[sbZ].setOpaque(true);
    msg[sbZ].setBackground(Color.black);
    msg[sbZ].setForeground(Color.red);
    msgArea.add(msg[sbZ]);
    getContentPane().add(msgArea, BorderLayout.SOUTH);
    } // end init();
    //===================================================
    public void stop(){canvas.stopRunning();}
    //===================================================
    // The following nested class represents the drawing surface
    // of the applet and also does all the work.
    class Display extends JPanel implements ActionListener, Runnable {
    Image OSI;
    Graphics OSG; // A graphics context for drawing on OSI.
    Thread runner; // A thread to do the computation.
    boolean running; // Set to true when the thread is running.
    public void paintComponent(Graphics g) {
    if (OSI == null) {
    g.setColor(Color.black);
    g.fillRect(0,0,getWidth(),getHeight());
    else {g.drawImage(OSI,0,0,null);}
    }//paintComponent
    public void actionPerformed(ActionEvent evt) {
    String command = evt.getActionCommand();
    if (command.equals(buttonDesc[buttonStart])) {
    startRunning();
    if (command.equals(buttonDesc[buttonQuit])) {
    stopRunning();
    if (command.equals(checkBoxDesc[checkBoxWait])){
    System.out.println("cb");
    if (checkBox[checkBoxWait].isSelected() ) {
    wait = true;
    System.out.println("cb selected twait "+wait);
    return;
    wait = false;
    synchronized(getTreeLock()) {getTreeLock().notifyAll();}
    System.out.println("cb selected fwait "+wait);
    } // end command.equal cb wait
    } //end action performed
    // A method that starts the thread unless it is already running.
    void startRunning() {
    if (running)return;
    // Create a thread that will execute run() in this Display class.
    runner = new Thread(this);
    running = true;
    runner.start();
    } //end startRunning
    void stopRunning() {running = false;System.exit(0);}
    public void run() {
    button[buttonStart].setEnabled(false);
    int x;
    x=1;
    while(x>0 && running){
    x = x + 1;
    msg[0].setText(""+x);
    try{SwingUtilities.invokeAndWait(painter);}catch(Exception e){}
    //importand dont put this in actionPerformed
    if (wait) {
    System.out.println("run "+wait);
    synchronized(getTreeLock()) {
    while(wait) {
    System.out.println("while "+wait);
    try {getTreeLock().wait();} catch(Exception e){break;}
    } //end while(wait)
    } // end sync
    } // end if(wait)
    } // endwhile(x>0)
    stopRunning();
    } // end run()
    Runnable painter = new Runnable() {
    public void run() {
    Dimension dim = msg[0].getSize();
    msg[0].paintImmediately(0,0,dim.width,dim.height);
    Thread.yield();
    }//end run in painter
    } ; //end painter
    } //end nested class Display
    } //end class Wc

    I just encountered a similar issue.  I bought a new iPhone5s and sent my iPhone4s for recycling as it was in great shape, no scratches, no breaks, perfect condition.  I expected $200 and received an email that I would only receive $24.12.  The explanation was as follows:  Phone does not power on - Power Supply Error.   Attempts to discuss don't seem to get past a customer service rep that can only "escalate" my concern.  They said I would receive a response, but by email.  After 4 days no response.  There is something seriously wrong with the technical ability of those in the recycling center.

  • Proxies , Event handlers and exceptions

    Hi All,
    I am using an inbound proxy to communicate with CRM system via XI.
    I have to raise event handlers and exception catch using Try,,.. Catch OOps concept in the Proxy. Could anyone have some examples of similar kind of scenarios mentioning step by step. I am expecting a scenario and source code.
    thanks
    Deno

    HI,
    Please look at this thread on error handling:
    http://help.sap.com/saphelp_nw04/helpdata/en/25/a45c3cff8ca92be10000000a114084/content.htm
    Regards
    Vijaya

  • JVMDI Launching and Thread Suspension

    Hi,
    I am using JVMDI to debug a java application. I launch the application and debugger with the following command line.
    java -Xdebug -Xnoagent -XrunTest:ADA <applicationName>
    When I try and suspend the application after a method entry event, everything (including my JVMDI debugger) is suspended. This is not what I had thought would happen. I only want the application thread to suspend so that I can access the stack frames. Is there a problem with the way I am loading the application and debugger � or am I suspending that application incorrectly (see below).
    err = jvmdi->GetMethodLocation((*event).u.frame.clazz,
    (*event).u.frame.method,
    &startLocationPtr, &endLocationPtr);
    err = jvmdi->GetMethodName((*event).u.frame.clazz,
    (*event).u.frame.method,
    &namePtr, &signaturePtr);
    err = jvmdi->GetSourceFileName((*event).u.frame.clazz,&SourceNamePtr);
    /* is this the application class or a system class */
    if ((strncmp(prefix,SourceNamePtr,prefixLength) == 0))
    err = jvmdi->SuspendThread((*event).u.frame.thread);
    Any help would be greatly appreciated.
    Chief

    Are you running your JVMDI code on the same thread as the
    application? If so, then SuspendThread will indeed suspend
    everything, and your code will not be able to resume itself.
    Is (*event).u.frame.thread the same as `this` thread in your code?
    Then you are suspending yourself. You will need to take pains
    to run your code on a Debug thread. See "RunDebugThread" at this URL:
    http://java.sun.com/j2se/1.4.1/docs/guide/jpda/jvmdi-spec.html#RunDebugThread
    It would be less intrusive on the debugee if you wrote
    an out-of-process debugger that attached to the debugee
    using the Java Debug Interface (JDI). For more information,
    refer to the Architecture Overview document:
    http://java.sun.com/j2se/1.4.1/docs/guide/jpda/architecture.html
    JDI has an added advantage: it is a Java Language API, which
    means you can write your debugger in the Java Language. There
    is a reference debugger (jdb) with source available for you to
    study. Unpack $JAVA_HOME/demo/jpda/examples.jar, and
    then look at
    Trace.java and TTY.java (and their related support classes).

  • Upgraded to ios 7.1 battery drain is significant and have lost my calendar events. how do i get my events back and why am i losing so much power now?

    how do i get my calendar events back and why the power drain after upgrading my operating system to 7.1?

    Thought I'd reply to this seen as no one else has, I am also experiencing very similar problems with my 4s and by the looks of it is it's across all handsets. I've never had any battery issues with my iPhone even 7.0.6 was fine, but since updating to 7.1 the battery is ticking down very fast. I fully charged in the morning and left it in my locker all day at work when I got my hands on it it's gone down to 52% just on its own!!
    I really hope they sort this out fast the irony is 7.1 was supposed to help battery life!

  • Training n event management and pd

    Hi gurus,
    my cliient wants to implement training n event mgnmt and pd.client is not specific about the procedures of training and development. he wants to implement as per the best practices of sap. i was only into om , pa and payroll.
    i dont even  have a tinge of idea abt these submodules. i tried searching in forums and other sites to to my dissapointmnt. i am in a big soup now as i need to gather the requirement and do the configurations in a weeks time i.e by next weekend. plzzzzzz help me out with some best practices or some config docs as i dont know even the basics of these. I would appreciate if some body is helping me out with config docs.
    Thanks n advance,
    tulsi

    Hi Tulsi,
    Please go to our help website :
    Appraisals
    http://help.sap.com/saphelp_47x200/helpdata/en/77/bff8ab4a2911d182b80000e829fbfe/frameset.htm
    and you can also use the link:
    https://websmp209.sap-ag.de/bestpractices
    Thanks
    Chetan

  • Training & Event management and Appraisal

    Hi,
    Can anyone tell us that Training & Event management and Appraisal are available standard ESS package?
    Thanks,
    Anumit

    Yes, Training & Event management and Appraisal are available in ITS based ESS business package.
    But latest ESS business package(webdynpro based) do not have training and event management. You may need to deploy Learning solution. Full functionality of Appraisal is available with ehp4 of ESS BP.

  • Is there a way to enter an event time in Calendar as a reminder for me and NOT have Calendar erase it in the info as it reads it into the event start and end times?

    Calendar can recognize and derive event start and end times from the text description entered.  However, when it seizes on a time (start and/or end) and automatically enters it as the start and/or end time, it also (sigh) deletes the time from the text.  I enter the times as reminders for me, how can one prevent them from being deleted by Calendar??

    I am having the same darn problem. I really dislike this auto feature in Calendar.
    Can anyone help us please?

Maybe you are looking for