Created
April 8, 2009 22:33
-
-
Save pkieltyka/92094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) controlTextDidChange:(NSNotification *)aNotification | |
{ | |
if ([[queryField stringValue] length] == 0) { | |
[self.resultController hide]; | |
[query clearQuery]; | |
[progress stopAnimation:nil]; | |
}else { | |
[progress startAnimation:nil]; | |
[query executeQuery:[queryField stringValue]]; | |
} | |
} | |
-(void) beginInitialGatheringHandler:(id)sender | |
{ | |
NSLog(@"beginInitialGatheringHandler"); | |
NSLog(@"query result count = %@", [NSNumber numberWithInt:[query resultCount]]); | |
} | |
-(void) processInitialGatheringHandler:(id)sender | |
{ | |
NSLog(@"processInitialGatheringHandler"); | |
NSLog(@"query result count = %@", [NSNumber numberWithInt:[query resultCount]]); | |
[self.resultController show]; | |
} | |
-(void) finishInitialGatheringHandler:(id)sender | |
{ | |
// TODO: if the only thing we do here is stop the query, perhaps | |
// I should move this to HMetadataQuery | |
NSLog(@"finishInitialGatheringHandler"); | |
NSLog(@"query result count = %@", [NSNumber numberWithInt:[query resultCount]]); | |
if ([query resultCount] == 0) { | |
[self.resultController hide]; | |
} | |
[progress stopAnimation:nil]; | |
// Stop live queries in the background | |
[query stopQuery]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment