objective c - QTMovie not playing in new window -


i have mac osx application in press button in main window , open new window in movie played. ibaction code;

- (ibaction) playbuttonclicked: (id) sender {    movieplayercontroller *movieplayerwindow = [[movieplayercontroller alloc] initwithwindownibname:@"movieplayer"];    [movieplayerwindow showwindow:self];    nserror *error;   nsstring *moviepath = [[nsbundle mainbundle] pathforresource:@"sample_itunes" oftype:@"mov"];   qtmovie *movie = [qtmovie moviewithfile:moviepath error:&error];   if (error) {       nslog(@"%@", [error localizeddescription]);   } else {       [movie gotobeginning];       [movieplayerwindow.movieviewer setmovie:movie];       [movieplayerwindow.movieviewer play:nil];    }  } 

movieviewer qtmovieviewer outlet inside new window.

the window opens no movie played; can understand doing wrong ? can send complete project (it test one, small) if needed.

try changing nserror *error; nserror *error = nil;


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -