Win32 SetCursor from other thread (Wait Cursor)

As soon as my application starts to decode a bitmap, i need to update two static text labels to show current progress. Updating them for every decoded pixel would be too overkill so I decided to make every update inside a timer every 150ms.
This obviously implies the use of a worker thread that leaves the main UI thread able to process WM_TIMER messages thus updating these two textlabels, and invalidate the possibility of just surrounding my work code in two SetCursor functions.
I googled a bit and found that handling WM_SETCURSOR could do the trick, and so I tested it this way :
case WM_SETCURSOR:
if (DecodingThreadRunning) SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_WAIT)));
else SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW)));
break;
Somehow the call gets executed with no errors but the cursor remain the same.
I also tried to surrond the working thread with the AttachThreadInput function but still no luck :
HWND hWnd = GetForegroundWindow();
DWORD foregroundThreadID = GetWindowThreadProcessId(hWnd, 0);
DWORD currentThreadID = GetCurrentThreadId();
AttachThreadInput(foregroundThreadID, currentThreadID, TRUE);
SetCursor(LoadCursor(NULL, MAKEINTRESOURCE(IDC_WAIT)));
//Do the work
AttachThreadInput(foregroundThreadID, currentThreadID, FALSE);
Honestly I feel lost since i'm not even sure that the IDC_WAIT cursor was supposed to be used in this case, since the main GUI remains actually usable and stable (although few option gets disabled)
Thanks in advance for any help
PS: Running an update every nth pixel would not be as stable and fancy looking as the more accurate update of a timer
PPS: That's it I'm a retard.    I forgot to return TRUE from WM_SETCURSOR.
I'll change the core of the question then : is the wait cursor supposed to be used in this case ? why attachthreadinput does not work ? Does it needs the thread to have a message queue ?

Somehow the call gets executed with no errors but the cursor remain the same.
Set a breakpointer to check if SetCursor method is reached.
if (DecodingThreadRunning)
And how do you determine your thread is running? Do you use WaitForSingleObject method? We need some more information to reproduce this issue.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Hi all, i can't sync over wifi between my iPhone 4 and Windows 7 64 bit, wifi sync works with the same phone and my Windows 8 machine, tried solutions from other threads with no luck, just thought i'd see if anyone else had any ideas, thanks.

    Hi all, i can't sync over wifi between my iPhone 4 and Windows 7 64 bit, wifi sync works with the same phone and my Windows 8 machine so the problem seems confined to Windows 7. I've tried solutions from other threads -
    Making sure everything is allowed through firewall
    Rebooting phone/laptop/router
    Disabling ipv6
    Disabling all networks except the one curently on
    Re-installing iTunes
    Restoring iPhone
    No luck with any of those unfortunately so i just thought i'd see if anyone else is still without wifi sync after trying those as well and if you ever found a fix, thanks.

    I just wanted to leave a note that it's working now. I'm not sure if it was the latest iTunes update that got it working or that i decided to start a new library instead of using the one i had backed up on Windows 8 (it didn't occur to me to check using the old library when i re-installed iTunes). But if anyone is having this problem, it might be worth trying again with a new installation of iTunes to see if the latest update works for you, and if not, try using a fresh library instead of a backup (by fresh library i mean discard your old library completely and start a new library, not just restore as new iPhone, a whole new library).

  • Problems With PrE 8 - Split From Other Thread

    GEAtkins (Glenn) posted some info on his system into another THREAD. He posted a lot of good information on his system and also on some diagnostics, that I asked for. For anyone, who wants to see his info and a complete statement of his problems, please see the link above. It's a well-detailed post, and he's been quick to furnish the requested data. It's being reviewed now, but would also like for others to review it too, as there might be additional ideas.
    I do not want to pollute that other thread with work on Glenn's issue, or drag it on a tangent, so I'd appreciate that anybody with input on Glenn's problems post to this thread. I will be doing so, as soon as the review of the diagnostics is done. I also did not want to re-post all info provided here, so please just link and read.
    I hope that this will be beneficial to Glenn and not interfere with another thread requesting reports on how PrE 8 runs on others' systems.
    Thanks,
    Hunt

    Glenn, it appears that you have 3x HDD's, 1x = 250GB, 2x = 350GB. Are these 3x physical HDD's, and not partitions?
    How are these HDD's allocated? I see that D:\ is nearly full. How is this drive, especially, used?
    I hope that you do not mind my calling in an expert on this, but I knew that Harm would find more things, than I would. First, his eyesight is better than mine, and he's also smarter! [plus most people say he's also better looking, than I am.]
    To distill my recs., and I think most of Harm's:
    Look into static Virtual Memory management in Windows. Up the size of the Page File. Around 2 - 2.5x installed RAM works well for NLE work.
    There are some Processes that can probably removed from Startup. iTunes Helper is one of those. When doing an editing session, I strongly recommend not having any on-line presence, and then freeing up resources, for that session, by turning OFF some of your security functions. Then, using a Process manager, like EndItAll, to eliminate those Processes, that are not needed. Even on my workstation, for all but the most simple edits, I do this routinely. It is easy, and one can come back and turn those on manually, or just re-boot, and they'll all be loaded.
    Also, please let me know about your I/O sub-system, i.e. your HDD's. The main questions are above.
    Harm and I are pretty much in agreement that there should not be any conflicts with your NLE and audio-editing programs. I have most on my workstation, plus many more audio-editing programs (just not Sony). I have no issues doing so. I believe that all were installed after PrPro, and I've seen no priority issues with any CODEC, or modules. All runs fine, so I do not think that there would be a conflict there. I have observed that Adobe, CyberLink and Magix all seem to play very well together, at least in my installation.
    Good luck,
    Hunt
    PS - Harm, thank you so much for your time and your report. I know that your efforts will help Glenn, and I appreciate your input, as always. Thanks! The next bottle of Montrachet is on my tab, OK?
    [Edit] One last question: regarding the SearchIndexer, do you have Windows' Indexing turned on for your HDD's? That program can not only rob resources, but will "lock" your Folders, while it tries to do its thing. It can be useful for .DOC, .TXT, etc. files, but for AV files, and especially the large working files that any NLE generates, it cannot extract any useful info, yet it will try, and try. Every time that a file is changed, like your PREL file, or those working files, it'll run in and "lock" that file, while it tries to extract info from it - every time. It can be turned OFF in your My Computer>[Drive Letter]>Properties panel. In XP, one can determine it's indexing by folders, so one could leave it ON for say your .DOC folder. I do not know how finely you can tune it in Vista, or Win7. I keep it OFF for all HDD's, and a Search is not much slower. Remember, it cannot extract useful data from the AV, or working files, no matter how many times it tries, so all it's doing is hogging resources and "locking" files, that your NLE needs and changes all the time.
    Message was edited by: the_wine_snob - Added [Edit]

  • Problems quicksorting my linkedlist (extention from other thread)

    Ok so now that I've got my concepts down I went to do a sort method and I'm having problems with my sort method. (the previous thread with my actual class is http://forum.java.sun.com/thread.jspa?messageID=10222048)
    Here is the sort method. Can anyone help me figure out what I'm doing wrong? (for reference..I'm getting a NullPointerException somewhere)
    public WordList sort()
              Node pivotNode=head;
              remove(head.data);
              WordList small = new WordList(br);
              WordList big = new WordList(br);
              Node first = head;
              while(first!=null)
                   if(first.data.compareTo(pivotNode.data)<0)
                        small.add(first.data);
                   else
                        big.add(first.data);
                   first=first.next;
              big.addToFront(pivotNode.data);
              small = small.sort();
              big = big.sort();
              while(big.head!=null)
                   small.add(big.head.data);
                   big.head=big.head.next;
              return small;
         }

    remove(head.data);
    Node first = head;
    if(first.data.compareTo(pivotNode.data)<0)Looking at those statements in order, I see the possiblity for a problem with null.
    Wouldn't first.data be null?
    Edited by: Newworld20 on Apr 24, 2008 3:42 PM

  • Jstack shows a thread waiting for monitor entry but it's already acquired

    I have a heavy load website powered by tomcat-6.0.14 and jdk1.6.0_02-b05(amd64) on a 2 dual-core amd Opteron. When tomcat started, and I directed the http request(~200/s) abruptly to tomcat, it looks choked for over one minute, and if I took off the http requests, tomcat can recover in a few minutes.
    Then I use jstack during the choke time to find what's the cause, where I found a strange situation. Almost all threads are blocking on getting a log4j lock(I think it's normal,since log4j use a coarse lock), but one thread which already got the lock are also blocked. Below is the stack trace.
    "http-172.23.24.29-8011-exec-175" daemon prio=10 tid=0x00002aad37843400 nid=0x542d waiting for monitor entry [0x0000000052e55000..0x0000000052e55da0]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - locked <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:133)
    at com.xxx.xxxx.TimingLogFilter.doFilter(TimingLogFilter.java:39)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    And all the other threads waiting for the log4j lock.
    "http-172.23.24.29-8011-exec-176" daemon prio=10 tid=0x00002aad37773800 nid=0x542e waiting for monitor entry [0x0000000052f56000..0x0000000052f56b20]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - waiting to lock <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:133)
    at com.xxx.xxxxx.TimingLogFilter.doFilter(TimingLogFilter.java:39)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    I'm really wondering why jstack shows the first thread is BLOCKED but no blocker.
    And also, it's not a deadlock, since I made jstack log after sever seconds, and found this time another thread has the same problem.
    "http-172.23.24.29-8011-exec-170" daemon prio=10 tid=0x00002aad3784d800 nid=0x5428 waiting for monitor entry [0x0000000052950000..0x0000000052950c20]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - locked <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at org.apache.commons.logging.impl.Log4JLogger.info(Log4JLogger.java:133)
    at com.xxx.xxxx.TimingLogFilter.doFilter(TimingLogFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    What's the cause? Is jstack accurate? Or, the problem is caused by hotspot compling since tomcat is just started? Or it's just because log4j's coarse lock? ( but after the starup, tomcat can handle the same traffic without any problem, and jstack shows no log4j block at all.)
    Thanks in advance.
    Jimcgnu

    "http-172.23.24.29-8011-exec-175" daemon prio=10 tid=0x00002aad37843400 nid=0x542d waiting for monitor entry [0x0000000052e55000..0x0000000052e55da0]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - locked <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    It seems like a Dead Lock.
    The thread must have entered into a synchronized block/method1() and acquired a lock.
    - locked <0x00002aaab39d5670> (a org.apache.log4j.spi.RootLogger)
    While having lock the thread might be trying to acquire a lock to another synchronized block/method2()
    waiting for monitor entry
    java.lang.Thread.State: BLOCKED (on object monitor)
    and someother thread might have already acquired a lock to that block/method2().
    Can we check for Dead Lock??

  • PB 1.67 HiRes - chimes, won't boot. Tried suggestions in other threads.

    sorry -- I hate cross-posting but i'm not getting many hits in the "Using..." forum.
    I've tried everything I can find here and elsewhere to get it to boot.
    The powerbook chimes and the screen stays black. - No beeping as you would expect with memory problems. HD and optical drives make less sound than they should, for a minute or so. and then it's only fans whirring, it's dead quiet in there.
    I've disconnected the optical drive and the PRAM battery, which I suspect was dead anyway. I learned from other threads that PowerBooks do not need a PRAM battery to boot, but a dead PRAM battery can keep your mac from booting. The replacement battery is very expensive so I've just pulled it for now.
    With optical drive disconnected, the HD only whirs faintly for 20 seconds but does not seem to be loading the boot sequence.
    I've tried replacing the HD with a fresh HD, containing a cloned backup of a PB system (same model) - thought at least that would boot. Did not.
    I've tried unseating the RAM and reseating it, and I've tried putting RAM in ONLY the upper or ONLY the lower slot. Still no boot, and no beep either.
    I've reset the PMU. I've tried PRAM reset (before removing that), and OF reset, and many other key combinations at startup chime. None had any noticeable effect.
    When optical drive was connected, it whirred indecisively but did not spin up.
    I discovered a DVD stuck in the drive, which I have removed by disassembling the drive, but when reconnected, the drive whirred exactly as before.
    I've also DiskWarriored the original HD and it's in good shape, with the directory rebuilt.
    Thanks in advance if any of ye troubleshooters have any advice.

    The powerbook chimes and the screen stays black.
    Have you hooked up an external screen to see if it's a display issue? If you look really carefully, can you see anything faintly on the Powerbook screen?
    I've tried replacing the HD with a fresh HD, containing a cloned backup of a PB system (same model) - thought at least that would boot. Did not.
    Have you tried booting to an OS X disk in the DVD drive by holding the C key down?
    Have you tried a safe boot holding the option key down?
    Do you have an external firewire enclosure you can mount the hard drive in, and reboot holding the alt/option key down, then choosing that?
    Have you tried the Apple hardware test, where you insert the first OS X disk that came with your system and reboot holding the alt/option key down, choose AHT, and choose extended test when prompted?
    If the answers to those questions are all fail, then it sounds like your logic board has failed.

  • Updating CniNumEdit from another thread

    I get the following Exception,
    First-chance exception in pmdcsimulator.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
    My call Stack looks as below,
    KERNEL32! 77f1d479()
    MSVCRTD! _CxxThrowException@8 + 57 bytes
    AfxThrowOleDispatchException(unsigned short 0, const char * 0x00433e1c, unsigned int 0) line 1574
    PMDCSIMULATOR! NI::CNiControl::CheckThreadId(void) + 91 bytes
    PMDCSIMULATOR! NI::CNiControl::ValidateControl(void) + 22 bytes
    PMDCSIMULATOR! NI::CNiNumEdit:etValue(double) + 62 bytes
    CPmdcsimulatorDlg::AcquisitionWorkFunction() line 1147
    CPmdcsimulatorDlg::AcqProcessThreadFunction(void * 0x0012f2dc) line 1159
    _AfxThreadEntry(void * 0x0012ec58) line 112 + 13 bytes
    _threadstartex(void * 0x010
    96f80) line 212 + 13 bytes
    KERNEL32! 77f04ede()
    How do I update the control..?

    The UI control classes in Measurement Studio 1.0.1 do not support access from other threads. The next release of Measruement Studio will remedy this problem. Until then, there is an example program that shows how you can use a user message to work around this here: http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&24C350515009D6A1862569AC0073ACC6&cat=61B119A9F74ADC07862568C50070CE22
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • Synchronize work from multiple threads using wait() and notifyAll() help

    Hello folks,
    (Sorry for my bad english)
    My current project handles multiple access requests to a shared collection from multiple threads originating from different classess and methods. Therefor I need to keep track of the order in which the Threads access that collection. I wrote a sort of Buffer class that has a static instance entry which initiate a new Instance of my Buffer class, attributes the instance a cue number and return the instance to the caller Thread.(Just like when you go to a supermarket and draw a number to wait to get served at the cheese counter).The callerThread then uses this instance to execute a method within the buffer class. Inside the buffer class method, I want to set a while loop on wait() just like this:
    while(currentCue != myCueState)
    wait();
    when all other prior method calls within my Buffer class are done, the loop should wake up using a notifyAll() call and check the condition "currentCue != myCueState" agen to see if its turn has come.
    I am new to the wait() and notifyAll() stuff and are therefor not sure what I am dooing wrong here: The only way this buffer class finishes all it's cues is when the caller Threads are beeing executed in the same order than they have checked in to the Buffer class. Otherwise I get some sort of dead-lock in the middle. Here is my code for the Buffer class:
    public class Buffer{
        private static int currentCue = 0;
        private static int lastCued = 0;
        private int myCueState;
        private Buffer myInstance = null;
        synchronized void doTaskOne(){      
            try{
                while(currentCue != myCueState)
                    wait();           
                //Do your task now
                System.out.println("doTaskOne got Executed: "+currentCue);
                currentCue++;
                notifyAll();
            catch(Exception a){}
        synchronized void doTaskTwo(){
             try{
                while(currentCue != myCueState)
                    wait();
                //Do your task now
                System.out.println("doTaskTwo got Executed: "+currentCue);
                currentCue++;
                notifyAll();
            catch(Exception a){}
        synchronized void doTaskThree(){
            try{
                while(currentCue != myCueState)
                    wait();          
                //Do your task now
                System.out.println("doTaskThree got Executed: "+currentCue);
                currentCue++; 
                notifyAll();
            catch(Exception a){}
        synchronized Object getSomething(){
            try{                   
                while(currentCue != myCueState)
                    wait();           
                //Do your task now
                System.out.println("getSomething got Executed");
                currentCue++;
                notifyAll();
            catch(Exception a){}
            return "something";
        //Access the buffer class through a single static synchronized instance and draw a turn number
        public synchronized Buffer instance(){
            myInstance = new Buffer();
            myInstance.setMyCueState();
            return myInstance;
        private void setMyCueState(){
             myCueState = lastCued;
             lastCued++;
    }and here for the Test class I have coded to test this:
    public class TestBuffer{
         private Buffer accessOne;
         private Buffer accessTwo;
         private Buffer accessThree;
         private Buffer accessFour;
         public TestBuffer(){
                    //Instantiate different instances from Bufferclass and draw a number
              accessThree = new Buffer().instance();
              accessOne = new Buffer().instance();
              accessTwo = new Buffer().instance();          
              accessFour = new Buffer().instance();
              Thread one = new Thread(){
                   public void run(){
                        accessOne.doTaskOne();
              Thread two = new Thread(){
                   public void run(){
                        accessTwo.doTaskTwo();
              Thread three = new Thread(){
                   public void run(){
                        accessThree.doTaskThree();
              Thread four = new Thread(){
                   public void run(){
                        accessFour.getSomething();
              try{               
                   one.start();                    
                   two.start();
                   three.start();     
                   four.start();                         
              catch(Exception f){}
         public static void main(String args[]){
              TestBuffer myTest = new TestBuffer();
    }What am I doing wrong here??
    Maby this is not how I should use the notifyAll() method, but how then?
    Please give me a solution!
    Thanks

    Ok, so if I get you guys right, the following should do it:
    public class Buffer{
        private static Object sharedLock = new Object();
        public void doTaskOne(){      
              synchronized(sharedLock)  {
                System.out.println("doTaskOne got Executed: ");
        public void doTaskTwo(){
             synchronized(sharedLock)  {
                System.out.println("doTaskTwo got Executed: ");
        public void doTaskThree(){
             synchronized(sharedLock)  {
                  System.out.println("doTaskThree got Executed: ");
        public Object getSomething(){
            synchronized(sharedLock)  {
                System.out.println("getSomething got Executed");
                return "something";
    }Lets say that each method accesses the same ressources (in this case a table model) to retreave values, delete rows and set some existing values vith new values and all this 20-30 times a minute, all processing will stay synchronised and collision is not possible?
    And lets say I would update the Table model directly from the buffer Class using MyTableModel.instance().setValueAt() or watever methods I implemented on my Table model, could I safely do that using "SwingUtilities.invokeLater();" from my BufferClass just like this:
    public void doTaskThree(){
            synchronized(sharedLock)  {
                   Runnable runme = new Runnable(){
                         public void run(){
                                MyTableModel.instance().setValueAt("abc", 5,5);  
                   SwingUtilities.invokeLater(runme);
    }Thanks in advance for your help guys!

  • I need to transfer playlists from my old iphone into itunes so that I can then add them to my new iphone 6.  However, none of the playlists on my iphone appear when I connect to my macbook.  I have read other threads but have not found answer.  help!

    I am a group exercise instructor and rely heavily on my playlists.  My old phone is an iphone 4s and I just bought an Iphone 6.  I also have a macbook where I keep my itunes account, but I create all my playlists on my phone.  I need to transfer those playlists from my old iphone into itunes in my computer so that I can then add them to my new iphone 6.  However, none of the playlists on my iphone appear when I connect to my macbook.  I have read other threads where the suggestion was to attach the old phone to itunes, find the phone in itunes and click the little arrow to the left to show the playlists.  Then right click on the playlist and export it, saving it to the desktop, to then import it into itunes.  However, in my case, the playlists do not show up when the phone is connected to itunes.  I have clicked on the little arrow and all I get is "music", "purchased", etc., but none of my playlists.   I'm sure some years back I probably deleted something in my itunes library and now none of my playlists show.  Please help me.  I would hate to have to recreate all of my playlists.  Thank you!

    I know it sounds weird, and that is the reason I posted my question.  Because my case is not like all the ones I've found online and it's confusing.  I added a screen capture of my itunes with my old iphone (the one that houses my playlists) connected to it.
    My playlists "ARE"  in my iphone 4s.  They are still there even though they do not show up when I plug in to itunes in my computer. 
    When connecting my phone to itunes on my macbook, the playlists do not appear anywhere in itunes.  I have found my connected iphone icon, I have clicked on the arrow next to it and it does pull up the standard lists that come with the iphone/itunes:  Music, Movies, TV shows, books.  That's it! below that is "Genius" and below "Geniuns" is "PLAYLISTS"  but the only playlist of mine that shows there is one that I created several years back titled "90's music" and that one I created it on my computer, not my phone.  Under "90's music" there are also other standard playlists that itunes automatically adds.
    Does anyone else have this issue or know how to get around this.  I am starting to think that I am going to have to recreate these lists on my computer

  • HT4847 I have a new iphone and cannot delete the backup from icloud.  It says that it is in use.  I have read some of the other threads and it only seems to be haphazard solutions. Is there a definite way to fix this? I am not able to change icloud accoun

    I have a new iphone and cannot delete the backup from icloud.  It says that it is in use.  I have read some of the other threads and it only seems to be haphazard solutions. Is there a definite way to fix this? I am not able to change icloud accounts.

    Follow the steps in wjosten's post here: https://discussions.apple.com/message/13356770#13356770 (for Windows, substitute Outlook in step 2).

  • Automatic Wait Cursor -problems

    I have implemented an automatic wait cursor "system" as decribed in Guide 1( http://www.roseindia.net/javatutorials/WaitCursorEventQueue.shtml)
    The problem I have occurs at a specific moment:
    - I have one Jframe opening another Jframe. This Jframe again (a customer registration form) displays a simple JOptionPane box. At the moment the JOptionPane box is displayed, the whole system goes down.
    At all other times the wait cursor behaves exactly as intended.
    Does anyone have:
    - any experience with this (Guide 1) implementation of automatic wait cursor?
    - any other experience with automatic wait cursors?
    Regards

    yes, i actually use a slightly modified version of that concept and it works very well...so far.
    there is a known deadlock issue with it though which has been reported on many forums.
    you can get easily around it though, without any implications as far as i can tell at least.
    I have tried to reproduce your issue, but in the situation you describe i do not get any
    problems. possibly you ran across the above deadlock problem?
    the one thing i am not so sure about is that you call set/resetCursor not within the EDT.
    however from the source of JComponent.setCursor() it looks as if the call would be done directly
    on the native peer, so in theory it could be safe to do that call from within another thread.
    Edited by: produggt on 20.08.2008 18:47

  • Wait cursor not working with short cut keys

    Hi,
    I have JButton in my application for which i have set the short cut key using
    button.setMnemonic(char)
    method of JButton. Also i have set the wait cursor for the same button using
    button.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)) .
    I am getting the wait cursor if i click on the button,but not when i use the shortcut key.
    Why is it like that? Pls help me out.

    Why don't you use this class :
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.SwingUtilities;
    public class WaitCursorEventQueue extends EventQueue {
    public WaitCursorEventQueue(int delay) {
    this.delay = delay;
    waitTimer = new WaitCursorTimer();
    waitTimer.setDaemon(true);
    waitTimer.start();
    protected void dispatchEvent(AWTEvent event) {
    waitTimer.startTimer(event.getSource());
    try {
    super.dispatchEvent(event);
    finally {
    waitTimer.stopTimer();
    private int delay;
    private WaitCursorTimer waitTimer;
    private class WaitCursorTimer extends Thread {
    synchronized void startTimer(Object source) {
    this.source = source;
    notify();
    synchronized void stopTimer() {
    if (parent == null)
    interrupt();
    else {
    parent.setCursor(null);
    parent = null;
    public synchronized void run() {
    while (true) {
    try {
    //wait for notification from startTimer()
    wait();
    //wait for event processing to reach the threshold, or
    //interruption from stopTimer()
    wait(delay);
    if (source instanceof Component)
    parent = SwingUtilities.getRoot((Component)source);
    else if (source instanceof MenuComponent) {
    MenuContainer mParent =
    ((MenuComponent)source).getParent();
    if (mParent instanceof Component)
    parent = SwingUtilities.getRoot(
    (Component)mParent);
    if (parent != null && parent.isShowing())
    parent.setCursor(
    Cursor.getPredefinedCursor(
    Cursor.WAIT_CURSOR));
    catch (InterruptedException ie) { }
    private Object source;
    private Component parent;
    and then add to your application :
    //Wait cursor
    EventQueue waitQueue = new WaitCursorEventQueue(200);
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(waitQueue);
    The number (200) specifies the milliseconds to activate the WaitCursor.
    It will work anytime your app is busy for more than that time.

  • Wait cursor problem

    Hello,
    Here is the problem :
    I've put a wait cursor when there is background treatments and when the user have to wait for it before doing something else.
    But, when the EventDispatchThread is doing some treatment (callback), the wait cursor is flickering, giving sometime the impression that background treatments are finished.
    Is there a way to keep the cursor in the wait cursor form whatever happening in background ?
    Thank u ..
    Djeouaille.

    setCursor is specific to the Component from which you call it. I would suggest calling setCursor on your top-level frame and nowhere else if you want the appearance that your entire window is busy doing something. Also, be sure to put your calls to setCursor in the main (Swing) thread. Check to see that you're not repeatedly calling setCursor thereby causing the flickering yourself. Ideally you should be able to do the following without having the wait cursor flicker:
    topLevel.setCursor(waitCursor)
    //perform a lengthy operation
    topLevel.setCursor(normalCursor)-B

  • Problem with JFrame and busy/wait Cursor

    Hi -- I'm trying to set a JFrame's cursor to be the busy cursor,
    for the duration of some operation (usually just a few seconds).
    I can get it to work in some situations, but not others.
    Timing does seem to be an issue.
    There are thousands of posts on the BugParade, but
    in general Sun indicates this is not a bug. I just need
    a work-around.
    I've written a test program below to demonstrate the problem.
    I have the problem on Solaris, running with both J2SE 1.3 and 1.4.
    I have not tested on Windows yet.
    When you run the following code, three JFrames will be opened,
    each with the same 5 buttons. The first "F1" listens to its own
    buttons, and works fine. The other two (F2 and F3) listen
    to each other's buttons.
    The "BUSY" button simply sets the cursor on its listener
    to the busy cursor. The "DONE" button sets it to the
    default cursor. These work fine.
    The "SLEEP" button sets the cursor, sleeps for 3 seconds,
    and sets it back. This does not work.
    The "INVOKE LATER" button does the same thing,
    except is uses invokeLater to sleep and set the
    cursor back. This also does not work.
    The "DELAY" button sleeps for 3 seconds (giving you
    time to move the mouse into the other (listerner's)
    window, and then it behaves just like the "SLEEP"
    button. This works.
    Any ideas would be appreciated, thanks.
    -J
    import java.awt.BorderLayout;
    import java.awt.Cursor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class BusyFrameTest implements ActionListener
    private static Cursor busy = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
    private static Cursor done = Cursor.getDefaultCursor();
    JFrame frame;
    JButton[] buttons;
    public BusyFrameTest (String title)
    frame = new JFrame (title);
    buttons = new JButton[5];
    buttons[0] = new JButton ("BUSY");
    buttons[1] = new JButton ("DONE");
    buttons[2] = new JButton ("SLEEP");
    buttons[3] = new JButton ("INVOKE LATER");
    buttons[4] = new JButton ("DELAY");
    JPanel buttonPanel = new JPanel();
    for (int i = 0; i < buttons.length; i++)
    buttonPanel.add (buttons);
    frame.getContentPane().add (buttonPanel);
    frame.pack();
    frame.setVisible (true);
    public void addListeners (ActionListener listener)
    for (int i = 0; i < buttons.length; i++)
    buttons[i].addActionListener (listener);
    public void actionPerformed (ActionEvent e)
    System.out.print (frame.getTitle() + ": " + e.getActionCommand());
    if (e.getActionCommand().equals ("BUSY"))
    frame.setCursor (busy);
    else if (e.getActionCommand().equals ("DONE"))
    frame.setCursor (done);
    else if (e.getActionCommand().equals ("SLEEP"))
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    else if (e.getActionCommand().equals ("INVOKE LATER"))
    frame.setCursor (busy);
    SwingUtilities.invokeLater (thread);
    else if (e.getActionCommand().equals ("DELAY"))
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    System.out.println();
    Runnable thread = new Runnable()
    public void run()
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.println (" finished");
    public static void main (String[] args)
    BusyFrameTest f1 = new BusyFrameTest ("F1");
    f1.addListeners (f1);
    BusyFrameTest f2 = new BusyFrameTest ("F2");
    BusyFrameTest f3 = new BusyFrameTest ("F3");
    f2.addListeners (f3); // 2 listens to 3
    f3.addListeners (f2); // 3 listens to 2

    I've had the same problems with cursors and repaints in a swing application, and I was thinking of if I could use invokeLater, but I never got that far with it.
    I still believe you would need a thread for the time consuming task, and that invokeLater is something you only need to use in a thread different from the event thread.

  • Messages will open nothing appears(with wait cursor)

    Since I upgraded to Mavericks, everytime i open Messages, it opens, and the top bar becomes Message settings but nothing appears and the wait cursor keeps turning forever so I have to force quit.
    I have tried opening it from the applications folder and resetting keychain as i read in other threads but it still doesnt work.
    I still get message notifications and the badge appears when i have a message. And the app and accounts are all working on my iphone.
    I keep sending error report to apple every time i force quit but it seems not enough people have this issue...
    Please help, it's bugging me so much.
    Thank you.

    Hi,
    Sending the reports is a silent thing and it may in fact be several Updates before anything makes it way to an update.
    I would check two things first.
    1) Open the Font Book from the Applications folder.
    Top left set it to All Fonts if it is not already
    Then use the Edit Menu > Look for Enabled Duplicates.
    Follow this by checking the Helvetica and Lucida Grande are active (Some App will not launch if Helvetica is Off and Lucida Grande is used to display Buddy lists when they have groups active  - you need the font before you open the app).
    2) Open the Contacts App.
    Use the Card Menu > Go to My Card
    This should be your Card and show your details.
    It should be marked with the Head and Shoulders icon.
    If it is neither of these can you post the Log you are sending to Apple ?
    If it is a Crash Log it may pay too be selective about how much you post.
    We need to see the OS version number info at the top and the app info under that.
    The info about the fault and the thread that crashed and those threads will help.
    The Binary Images bit can be very long.
    Limit this to the first 10 lines or so.
    Messages and the Address Book  should be listed near the top as involved items that have just been used by the app's processes.
    8:52 pm      Saturday; March 29, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

Maybe you are looking for

  • MM Purchase Order IDOC NEU output type configuration

    Hi All, after creation of Purchase Order in ME21N in ECC 6.0 server, i want an IDOC for Purchase order to be created........... i saw there is a standard output type NEU and it has EDI and Distribution Model as medium.......... when i went to ME21N a

  • Change Password Option not working in EP 7.0

    Hi, We have done the configurations for changing the password through get support option in the login page. It is working fine in development and quality. In production system, it is allowing us to change the password and sending the mail also. But w

  • How to include in Version 10.1.3.x?

    The following construction i use in my first project in the new version (Menu1.inc) <f:facet name="menu1"> <af:menuTabs var="menuTab" value="#{menuModel.model}"> <f:facet name="nodeStamp"> <af:commandMenuItem text="#{menuTab.label}" action="#{menuTab

  • Validation of business place and section code in fb60? (India)

    Hi gurus! I am facing the following problem: My India Customer wants me to create a validation to make business place and section code mandatory in fb60. I have read on many threads about this. Business place and section codes lies in the header in f

  • Error in running RPTQTA00

    I am receiving following error while running PRTQTA00: 'You have not selected any Generation Rules'. What to do. I configured all setting in Generation rule, Selection rule