// Fetch a gallery by id
- (TURAnselGallery *)getGalleryById: (NSString *)galleryId
{
- TURAnselGallery *g;
- for (g in galleryList) {
+ for (TURAnselGallery *g in galleryList) {
if ([galleryId isEqualTo: [NSNumber numberWithInt: [g galleryId]]]) {
return g;
}
NSURL *url = [NSURL URLWithString: [self valueForKey: @"rpcEndPoint"]];
XMLRPCRequest *request = [[XMLRPCRequest alloc]initWithHost: url];
[request setUserAgent: [self valueForKey:@"userAgent"]];
- [request setMethod: methodName
- withParameters: params];
+ [request setMethod: methodName withParameters: params];
NSDictionary *credentials = [[NSDictionary alloc] initWithObjectsAndKeys:
[self valueForKey:@"username"], @"username",
}
-#pragma mark TableView datasource ----------------------------------------------
+#pragma mark TableView datasource
- (int)numberOfRowsInTableView: (NSTableView *)tv
{
return [galleryList count];
return stringValue;
}
-#pragma mark Getter/Setters----------------------------------------------------
+#pragma mark Getter/Setters
- (TURAnselState) state
{
return state;
-(void) dealloc
{
NSLog(@"TURAnsel dealloc");
+ [galleryList removeAllObjects];
[galleryList release];
- galleryList = nil;
[rpcEndPoint release];
[username release];
[password release];
#pragma mark PrivateAPI
- (void)doLogin
{
- NSLog(@"Initiating the connection in [TURAnsel doLogin] in thread: %@", [NSThread currentThread]);
-
// Start out by building an array of parameters to pass to the api call.
// We start by asking for a list of available galleries with PERMS_EDIT.
// This has the side effect of authenticating for the session.