Professional Web Applications Themes

Help; Timer & window problem - Mac Programming

Hi, I have a timer in my app based on the sample code for "TickerView". pascal void CNHMem::AnimationTimer(EventLoopTimerRef inTimer, void* inUserData) { #pragma unused( inTimer ) CNHMem* view = (CNHMem*)inUserData; view->HandleTimer(); } My HandleTimer() function simply draws a coloured a rectangle in my app window, one rectangle every 2 seconds. It all works fine until I click on the app's menu item then the rectangles get drawn on the screen with the correct offsets to the monitor screen rather than my app window. It also happens when I click and hold on the traffic lights in the app window. They ...

  1. #1

    Default Help; Timer & window problem

    Hi,

    I have a timer in my app based on the sample code for "TickerView".

    pascal void CNHMem::AnimationTimer(EventLoopTimerRef inTimer, void* inUserData)
    {
    #pragma unused( inTimer )

    CNHMem* view = (CNHMem*)inUserData;

    view->HandleTimer();
    }

    My HandleTimer() function simply draws a coloured a rectangle in my app window, one rectangle every 2 seconds. It all works fine until I click on the app's menu item then the rectangles get drawn on the screen with the correct offsets to the monitor screen rather than my app window. It also happens when I click and hold on the traffic lights in the app window. They get drawn over the top of the desktop or the window of another app beneath.

    I have no idea where to start looking for the problem, I'm running XCode 1.1 and it's a nib based Carbon app.

    Any help appreciated.

    Regards,

    Paul



    P.Fredlein@NOSPAMuq.net.au Guest

  2. #2

    Default Re: Help; Timer & window problem

    On 9 Jan 2004 net.au wrote: 
     
    If you are using quickdraw, are you setting the port before you draw?

    Fred
     

    Frederick Guest

  3. #3

    Default Re: Help; Timer & window problem

    Hi,

    I don't have to set the port each time do I?

    I tried setting the port to my global WindowPtr trying both SetPort and SetGWorld but the app just quits.

    Paul


    Frederick Cheung wrote:
     

    >If you are using quickdraw, are you setting the port before you draw?
    >
    >Fred

    >[/ref]



    Paul Guest

Similar Threads

  1. pop up window problem
    By Alejandro Ramos in forum Macromedia Flash Player
    Replies: 1
    Last Post: December 20th, 11:31 PM
  2. pop up window problem over here
    By FreddyKiss webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 4
    Last Post: September 1st, 01:19 PM
  3. System.Timers.Timer vs. System.Threading.Timer
    By Kelsang Wangchuk in forum ASP.NET General
    Replies: 0
    Last Post: July 31st, 04:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139