// Show the gallery's image browser
- (IBAction)clickViewGallery: (id)sender
{
+ NSLog(@"clickViewGallery");
+ [_browserData removeAllObjects];
+ [browserView reloadData];
[spinner startAnimation: self];
[self setStatusText: @"Getting image list..."];
NSMutableArray *images = [_currentGallery listImages];
+ NSLog(@"Image Count: %d", [images count]);
if ([images count] == 0) {
[spinner stopAnimation: self];
[self setStatusText: @"Connected" withColor: [NSColor greenColor]];
NSLog(@"closeGalleryView");
[NSApp endSheet: mviewGallerySheet];
[mviewGallerySheet orderOut: nil];
- [_browserData removeAllObjects];
- [browserView reloadData];
}
- (IBAction) closeServerList: (id)sender
- (void)setDelegate: (id)newDelegate;
- (id)delegate;
- (NSURL *)galleryKeyImageURL;
-- (id)listImages;
+- (NSMutableArray *)listImages;
- (int)galleryId;
- (void)setAnselController:(TURAnsel *)newController;
@end
\ No newline at end of file
/**
* Get the complete list of image ids and URLs
*/
-- (id)listImages
+- (NSMutableArray *)listImages
{
- if (!imageList) {
-
+ if (![imageList count]) {
NSArray *params = [[NSArray alloc] initWithObjects:
@"ansel", //Scope
[NSNumber numberWithInt: _galleryId], //Gallery Id
imageList = [[response objectForKey: (id)kWSMethodInvocationResult] retain];
NSLog(@"listImages: %@", imageList);
-
- return imageList;
}
}
- return nil;
+ return imageList;;
}
/**