Index: /trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m
===================================================================
--- /trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m	(revision 540)
+++ /trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m	(revision 541)
@@ -9,8 +9,6 @@
 #import "NJRQTMediaPopUpButton.h"
 #import "NJRSoundManager.h"
-#import "NSMovie-NJRExtensions.h"
+#import "QTMovie-NJRExtensions.h"
 #import "NSMenuItem-NJRExtensions.h"
-
-#import <QTKit/QTKit.h>
 
 #include <limits.h>
@@ -372,18 +370,19 @@
         }
     } else {
-        NSMovie *movie = [[NSMovie alloc] initWithURL: [NSURL fileURLWithPath: [selectedAlias fullPath]] byReference: YES];
-        movieCanRepeat = ![movie isStatic];
-        if (movieHasAudio = [movie hasAudio]) {
-            [preview setMovie: doPreview ? [QTMovie movieWithURL: [NSURL fileURLWithPath: [selectedAlias fullPath]] error: NULL] : nil]; // XXX handle errors; fix
+	NSError *error;
+	QTMovie *movie = [[QTMovie alloc] initWithFile: [selectedAlias fullPath] error: &error];
+        movieCanRepeat = ![movie NJR_isStatic];
+        if (movieHasAudio = [movie NJR_hasAudio]) {
+            [preview setMovie: doPreview ? movie : nil];
         } else {
             [self _resetPreview];
             doPreview = NO;
             if (movie == nil) {
-                NSBeginAlertSheet(@"Format not recognized", nil, nil, nil, [self window], nil, nil, nil, nil, NSLocalizedString(@"The item you selected isn't a sound or movie recognized by QuickTime.  Please select a different item.", "Message displayed in alert sheet when media document is not recognized by QuickTime"));
+                NSBeginAlertSheet(@"Format not recognized", nil, nil, nil, [self window], nil, nil, nil, nil, [NSString stringWithFormat: NSLocalizedString(@"The item you selected isn't an image, sound or movie recognized by QuickTime. (%@)\n\nPlease select a different item.", "Message displayed in alert sheet when media document is not recognized by QuickTime"), [error localizedDescription]]);
                 [self _invalidateSelection];
                 return NO;
             }
-            if (![movie hasAudio] && ![movie hasVideo]) {
-                NSBeginAlertSheet(@"No video or audio", nil, nil, nil, [self window], nil, nil, nil, nil, NSLocalizedString(@"'%@' contains neither audio nor video content playable by QuickTime.  Please select a different item.", "Message displayed in alert sheet when media document is readable, but has neither audio nor video tracks"), [[NSFileManager defaultManager] displayNameAtPath: [selectedAlias fullPath]]);
+            if (![movie NJR_hasAudio] && ![movie NJR_hasVideo]) {
+                NSBeginAlertSheet(@"No video or audio", nil, nil, nil, [self window], nil, nil, nil, nil, NSLocalizedString(@"'%@' contains neither audio nor video content playable by QuickTime.\n\nPlease select a different item.", "Message displayed in alert sheet when media document is readable, but has neither audio nor video tracks"), [[NSFileManager defaultManager] displayNameAtPath: [selectedAlias fullPath]]);
                 [self _invalidateSelection];
                 [movie release];
Index: unk/Cocoa/Pester/Source/NSMovie-NJRExtensions.h
===================================================================
--- /trunk/Cocoa/Pester/Source/NSMovie-NJRExtensions.h	(revision 540)
+++ 	(revision )
@@ -1,18 +1,0 @@
-//
-//  NSMovie-NJRExtensions.h
-//  Pester
-//
-//  Created by Nicholas Riley on Sat Oct 26 2002.
-//  Copyright (c) 2002 Nicholas Riley. All rights reserved.
-//
-
-#import <AppKit/AppKit.h>
-
-
-@interface NSMovie (NJRExtensions)
-
-- (BOOL)hasAudio;
-- (BOOL)hasVideo;
-- (BOOL)isStatic;
-
-@end
Index: unk/Cocoa/Pester/Source/NSMovie-NJRExtensions.m
===================================================================
--- /trunk/Cocoa/Pester/Source/NSMovie-NJRExtensions.m	(revision 540)
+++ 	(revision )
@@ -1,41 +1,0 @@
-//
-//  NSMovie-NJRExtensions.m
-//  Pester
-//
-//  Created by Nicholas Riley on Sat Oct 26 2002.
-//  Copyright (c) 2002 Nicholas Riley. All rights reserved.
-//
-
-#import "NSMovie-NJRExtensions.h"
-#import <QuickTime/Movies.h>
-
-@implementation NSMovie (NJRExtensions)
-
-- (BOOL)hasAudio;
-{
-    return (NULL != GetMovieIndTrackType((Movie)[self QTMovie], 1, AudioMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly));
-}
-
-- (BOOL)hasVideo;
-{
-    return (NULL != GetMovieIndTrackType((Movie)[self QTMovie], 1, VisualMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly));
-}
-
-- (BOOL)isStatic;
-{
-    Movie movie = (Movie)[self QTMovie];
-    long trackCount = (long)GetMovieTrackCount(movie);
-    long trackIdx = 0;
-    Track track;
-    Media media;
-    for (trackIdx = 1 ; trackIdx <= trackCount ; trackIdx++) {
-        track = GetMovieIndTrack(movie, trackIdx);
-        if (track == nil) continue;
-        media = GetTrackMedia(track);
-        if (media == nil) continue;
-        if (GetMediaSampleCount(media) > 1) return NO;
-    }
-    return YES;
-}
-
-@end
Index: /trunk/Cocoa/Pester/Source/Pester.xcodeproj/project.pbxproj
===================================================================
--- /trunk/Cocoa/Pester/Source/Pester.xcodeproj/project.pbxproj	(revision 540)
+++ /trunk/Cocoa/Pester/Source/Pester.xcodeproj/project.pbxproj	(revision 541)
@@ -59,5 +59,5 @@
 		E1B11F4D0CF5F30F004975AA /* NSCharacterSet-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F5B79865038865B30136A8DD /* NSCharacterSet-NJRExtensions.m */; };
 		E1B11F4E0CF5F30F004975AA /* NSDictionary-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F5EE8DB9038A76AC0134BEAC /* NSDictionary-NJRExtensions.m */; };
-		E1B11F500CF5F30F004975AA /* NSMovie-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F59E4C0D036B43D2016B311C /* NSMovie-NJRExtensions.m */; };
+		E1B11F500CF5F30F004975AA /* QTMovie-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F59E4C0D036B43D2016B311C /* QTMovie-NJRExtensions.m */; };
 		E1B11F510CF5F30F004975AA /* NSString-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = E1F0B14F03ADBE3800AEFBE0 /* NSString-NJRExtensions.m */; };
 		E1B11F520CF5F30F004975AA /* NSTableView-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = E162698303B6189000000028 /* NSTableView-NJRExtensions.m */; };
@@ -309,6 +309,6 @@
 		F59E4BE7036B2E5E016B311C /* PSScriptAlert.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PSScriptAlert.h; sourceTree = "<group>"; };
 		F59E4BEA036B33EC016B311C /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
-		F59E4C0D036B43D2016B311C /* NSMovie-NJRExtensions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = "NSMovie-NJRExtensions.m"; sourceTree = "<group>"; };
-		F59E4C0E036B43D2016B311C /* NSMovie-NJRExtensions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "NSMovie-NJRExtensions.h"; sourceTree = "<group>"; };
+		F59E4C0D036B43D2016B311C /* QTMovie-NJRExtensions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = "QTMovie-NJRExtensions.m"; sourceTree = "<group>"; };
+		F59E4C0E036B43D2016B311C /* QTMovie-NJRExtensions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "QTMovie-NJRExtensions.h"; sourceTree = "<group>"; };
 		F59F6CB40354E7DA01AEEDB1 /* PSAlarm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PSAlarm.h; sourceTree = "<group>"; };
 		F59F6CB50354E7DA01AEEDB1 /* PSAlarm.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSAlarm.m; sourceTree = "<group>"; };
@@ -491,6 +491,6 @@
 				E1B1219C0CF63858004975AA /* NSImage-NJRExtensions.m */,
 				E1B1219D0CF63858004975AA /* NSImage-NJRExtensions.h */,
-				F59E4C0E036B43D2016B311C /* NSMovie-NJRExtensions.h */,
-				F59E4C0D036B43D2016B311C /* NSMovie-NJRExtensions.m */,
+				F59E4C0E036B43D2016B311C /* QTMovie-NJRExtensions.h */,
+				F59E4C0D036B43D2016B311C /* QTMovie-NJRExtensions.m */,
 				E1F0B14E03ADBE3800AEFBE0 /* NSString-NJRExtensions.h */,
 				E1F0B14F03ADBE3800AEFBE0 /* NSString-NJRExtensions.m */,
@@ -869,5 +869,5 @@
 				E1B11F4D0CF5F30F004975AA /* NSCharacterSet-NJRExtensions.m in Sources */,
 				E1B11F4E0CF5F30F004975AA /* NSDictionary-NJRExtensions.m in Sources */,
-				E1B11F500CF5F30F004975AA /* NSMovie-NJRExtensions.m in Sources */,
+				E1B11F500CF5F30F004975AA /* QTMovie-NJRExtensions.m in Sources */,
 				E1B11F510CF5F30F004975AA /* NSString-NJRExtensions.m in Sources */,
 				E1B11F520CF5F30F004975AA /* NSTableView-NJRExtensions.m in Sources */,
Index: /trunk/Cocoa/Pester/Source/QTMovie-NJRExtensions.h
===================================================================
--- /trunk/Cocoa/Pester/Source/QTMovie-NJRExtensions.h	(revision 541)
+++ /trunk/Cocoa/Pester/Source/QTMovie-NJRExtensions.h	(revision 541)
@@ -0,0 +1,18 @@
+//
+//  QTMovie-NJRExtensions.h
+//  Pester
+//
+//  Created by Nicholas Riley on Sat Oct 26 2002.
+//  Copyright (c) 2002 Nicholas Riley. All rights reserved.
+//
+
+#import <QTKit/QTKit.h>
+
+
+@interface QTMovie (NJRExtensions)
+
+- (BOOL)NJR_hasAudio;
+- (BOOL)NJR_hasVideo;
+- (BOOL)NJR_isStatic;
+
+@end
Index: /trunk/Cocoa/Pester/Source/QTMovie-NJRExtensions.m
===================================================================
--- /trunk/Cocoa/Pester/Source/QTMovie-NJRExtensions.m	(revision 541)
+++ /trunk/Cocoa/Pester/Source/QTMovie-NJRExtensions.m	(revision 541)
@@ -0,0 +1,34 @@
+//
+//  QTMovie-NJRExtensions.m
+//  Pester
+//
+//  Created by Nicholas Riley on Sat Oct 26 2002.
+//  Copyright (c) 2002 Nicholas Riley. All rights reserved.
+//
+
+#import "QTMovie-NJRExtensions.h"
+
+@implementation QTMovie (NJRExtensions)
+
+// at least on 10.5, QTMovie already implements undocumented "hasAudio" and "hasVideo"
+- (BOOL)NJR_hasAudio;
+{
+    return [[self attributeForKey: QTMovieHasAudioAttribute] boolValue];
+}
+
+- (BOOL)NJR_hasVideo;
+{
+    return [[self attributeForKey: QTMovieHasVideoAttribute] boolValue];
+}
+
+- (BOOL)NJR_isStatic;
+{
+    NSEnumerator *e = [[self tracks] objectEnumerator];
+    QTTrack *track;
+    while ( (track = [e nextObject]) != nil)
+	if ([[[track media] attributeForKey: QTMediaSampleCountAttribute] longValue] > 1)
+	    return NO;
+    return YES;
+}
+
+@end
