• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Code for NSMovieView updating in a loop problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Code for NSMovieView updating in a loop problem


  • Subject: Code for NSMovieView updating in a loop problem
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Tue, 26 Jul 2005 12:05:34 +0100

void CSplashWnd::Update() {
    if ( [myMovieView lockFocusIfCanDraw ] ) {
        NSRect R = [myMovieView frame];
        [myMovieView drawRect : R ];
        [myMovieView unlockFocus];
    }

    [myMovieView display];
    NSDate* d = [NSDate dateWithTimeIntervalSinceNow:0.05];
    [NSApp runUntilDate:d];



    static int CallNum = 0;
    CallNum++;
    if (CallNum > 50) {
        CallNum = 0;
    }

    NSString* s = CreateMovingNSString(CallNum); // looks like "   X"


[myTextView setString : s]; [myTextView display]; }

I see myTextView having an "X" sliding around inside of it, but the movieview is not displayed. I have properly initialised the movie, because as soon as the method ends, the movie is displayed with no intervention from me.


I'm testing this method like this:

    clock_t tFirst = clock();
    while ( ( clock() - tFirst ) < 500 ) {
        Splash.Update();
    }

It's just a test method, to see if I can get this to work.

Any ideas anyone? I'm trying to get the movie to update in a loop. I'm calling runUntilDate, also. Maybe I'm not calling it correctly?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Prev by Date: Re: Really struggling with Saving in NSDocument
  • Next by Date: Custom line breaking in NSTextView
  • Previous by thread: Re: Updating an NSMovieView in a busy loop
  • Next by thread: Custom line breaking in NSTextView
  • Index(es):
    • Date
    • Thread