Skip to content

Commit

Permalink
fixes to work with updated zkSforce.
Browse files Browse the repository at this point in the history
  • Loading branch information
superfell committed Dec 2, 2013
1 parent 15a8b66 commit 75a9e01
Show file tree
Hide file tree
Showing 7 changed files with 569 additions and 26 deletions.
548 changes: 548 additions & 0 deletions AppExplorer/AppExplorer.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions AppExplorer/BulkDelete.m
Expand Up @@ -22,11 +22,8 @@
#import "BulkDelete.h"
#import "ProgressController.h"
#import "EditableQueryResultWrapper.h"
#import "zkQueryResult.h"
#import "zkSObject.h"
#import "zkSforceClient.h"
#import "zkSforce.h"
#import "QueryResultTable.h"
#import "zkSaveResult.h"

@interface BulkDelete ()
-(void)doDeleteFrom:(int)start length:(int)length;
Expand Down
12 changes: 7 additions & 5 deletions AppExplorer/DataSources.m
Expand Up @@ -232,8 +232,8 @@ - (id)initWithDescribe:(ZKDescribeSObject *)s {
sobject = [s retain];

NSMutableArray *t = [NSMutableArray arrayWithObjects:@"Name", @"Label", @"PluralLabel", @"Key Prefix", @"Custom",
@"Createable", @"Updateable", @"Activateable", @"Deleteable", @"Undeleteable",
@"Mergeable", @"Queryable", @"Retrieveable", @"Searchable", @"Layoutable",
@"Createable", @"Updateable", @"Activateable", @"Deletable", @"Undeletable",
@"Mergeable", @"Queryable", @"Retrieveable", @"Searchable", @"Layoutable",
@"Replicateable", @"Triggerable", @"URL for Edit", @"URL for Detail", @"URL for New", nil];
NSArray *cr = [s childRelationships];
if ([cr count] > 0) {
Expand Down Expand Up @@ -268,7 +268,7 @@ -(id)tableView:(NSTableView *)view objectValueForTableColumn:(NSTableColumn *)tc
return [titles objectAtIndex:rowIdx];

SEL selectors[] = { @selector(name), @selector(label), @selector(labelPlural), @selector(keyPrefix), @selector(custom),
@selector(createable), @selector(updateable), @selector(activateable), @selector(deletable), @selector(undeleteable),
@selector(createable), @selector(updateable), @selector(activateable), @selector(deletable), @selector(undeletable),
@selector(mergeable), @selector(queryable), @selector(retrieveable), @selector(searchable), @selector(layoutable),
@selector(replicateable), @selector(triggerable), @selector(urlEdit), @selector(urlDetail), @selector(urlNew) };

Expand Down Expand Up @@ -330,7 +330,7 @@ - (id)tableView:(NSTableView *)view objectValueForTableColumn:(NSTableColumn *)t
SEL selectors[] = { @selector(name), @selector(label), @selector(type), @selector(custom), @selector(inlineHelpText),
@selector(length), @selector(digits), @selector(scale), @selector(precision), @selector(byteLength),
@selector(createable), @selector(updateable), @selector(cascadeDelete), @selector(restrictedDelete),
@selector(defaultOnCreate), @selector(calculated), @selector(autoNumber),
@selector(defaultedOnCreate), @selector(calculated), @selector(autoNumber),
@selector(unique), @selector(caseSensitive), @selector(namePointing), @selector(sortable), @selector(groupable), @selector(permissionable),
@selector(externalId), @selector(idLookup), @selector(filterable), @selector(htmlFormatted), @selector(nameField), @selector(nillable),
@selector(namePointing), @selector(referenceTo), @selector(relationshipName),
Expand All @@ -343,8 +343,10 @@ - (id)tableView:(NSTableView *)view objectValueForTableColumn:(NSTableColumn *)t

if (returnType[0] == 'c')
return f ? @"Yes" : @"";
if (returnType[0] == 'i')
if (returnType[0] == 'i')
return f == 0 ? (id)@"" : (id)[NSNumber numberWithInt:(int)f];
if (returnType[0] == 'q')
return [NSNumber numberWithLongLong:(long long)f];
if (returnType[0] == '@') {
if ([f isKindOfClass:[NSArray class]]) {
if ([f count] == 0) return @"";
Expand Down
2 changes: 1 addition & 1 deletion AppExplorer/Explorer.m
Expand Up @@ -550,7 +550,7 @@ - (ZKDescribeSObject *)selectedSObject {
return [descDataSource describe:selectedItem];
} else {
// field
return [selectedItem sobject];
return [(ZKDescribeField *)selectedItem sobject];
}
}

Expand Down
10 changes: 5 additions & 5 deletions AppExplorer/ZKDescribe_Reporting.m
Expand Up @@ -28,7 +28,7 @@ @implementation ZKDescribeField (Reporting)
- (NSString *)descriptiveType {
NSString *type = [self type];
if ([type isEqualToString:@"string"])
return [NSString stringWithFormat:@"text(%d)", [self length]];
return [NSString stringWithFormat:@"text(%ld)", (long)[self length]];
if ([type isEqualToString:@"picklist"])
return @"picklist";
if ([type isEqualToString:@"multipicklist"])
Expand All @@ -40,13 +40,13 @@ - (NSString *)descriptiveType {
if ([type isEqualToString:@"base64"])
return @"blob";
if ([type isEqualToString:@"textarea"])
return [NSString stringWithFormat:@"textarea(%d)", [self length]];
return [NSString stringWithFormat:@"textarea(%ld)", (long)[self length]];
if ([type isEqualToString:@"currency"])
return [NSString stringWithFormat:@"currency(%d,%d)", [self precision] - [self scale], [self scale]];
return [NSString stringWithFormat:@"currency(%ld,%ld)", (long)([self precision] - [self scale]), (long)[self scale]];
if ([type isEqualToString:@"double"])
return [NSString stringWithFormat:@"double(%d,%d)", [self precision] - [self scale], [self scale]];
return [NSString stringWithFormat:@"double(%ld,%ld)", (long)([self precision] - [self scale]), (long)[self scale]];
if ([type isEqualToString:@"int"])
return [NSString stringWithFormat:@"int(%d)", [self digits]];
return [NSString stringWithFormat:@"int(%ld)", (long)[self digits]];
return type;
}

Expand Down
16 changes: 6 additions & 10 deletions apexforce/zkApexClient.m
@@ -1,4 +1,4 @@
// Copyright (c) 2007 Simon Fell
// Copyright (c) 2007,2013 Simon Fell
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -148,10 +148,9 @@ -(NSString *)getResponseDebugLog:(zkElement *)soapRoot {
return [debugLogE stringValue];
}

- (NSArray *)sendAndParseResults:(ZKEnvelope *)requestEnv resultType:(Class)resultClass {
- (NSArray *)sendAndParseResults:(ZKEnvelope *)requestEnv name:(NSString *)callName resultType:(Class)resultClass {
NSString *soapRequest = [requestEnv end];
// NSLog(@"request is\r\n%@", soapRequest);
zkElement *soapRoot = [self sendRequest:soapRequest returnRoot:YES];
zkElement *soapRoot = [self sendRequest:soapRequest name:callName returnRoot:YES];
NSString *debugLogStr = [self getResponseDebugLog:soapRoot];
[self setLastDebugLog:debugLogStr];

Expand All @@ -173,8 +172,7 @@ - (NSArray *)compile:(NSString *)elemName src:(NSArray *)src {
[env startElement:elemName];
[env addElementArray:@"scripts" elemValue:src];
[env endElement:elemName];
[env endElement:@"s:Body"];
return [self sendAndParseResults:env resultType:[ZKCompileResult class]];
return [self sendAndParseResults:env name:[NSString stringWithFormat:@"%@:", elemName] resultType:[ZKCompileResult class]];
}

- (NSArray *)compilePackages:(NSArray *)src {
Expand All @@ -190,8 +188,7 @@ - (ZKExecuteAnonymousResult *)executeAnonymous:(NSString *)src {
[env startElement:@"executeAnonymous"];
[env addElement:@"String" elemValue:src];
[env endElement:@"executeAnonymous"];
[env endElement:@"s:Body"];
return [[self sendAndParseResults:env resultType:[ZKExecuteAnonymousResult class]] objectAtIndex:0];
return [[self sendAndParseResults:env name:NSStringFromSelector(_cmd) resultType:[ZKExecuteAnonymousResult class]] objectAtIndex:0];
}

- (ZKRunTestResult *)runTests:(BOOL)allTests namespace:(NSString *)ns packages:(NSArray *)pkgs {
Expand All @@ -203,8 +200,7 @@ - (ZKRunTestResult *)runTests:(BOOL)allTests namespace:(NSString *)ns packages:(
[env addElement:@"packages" elemValue:pkgs];
[env endElement:@"RunTestsRequest"];
[env endElement:@"runTests"];
[env endElement:@"s:Body"];
return [[self sendAndParseResults:env resultType:[ZKRunTestResult class]] objectAtIndex:0];
return [[self sendAndParseResults:env name:NSStringFromSelector(_cmd) resultType:[ZKRunTestResult class]] objectAtIndex:0];
}

@end
2 changes: 1 addition & 1 deletion zksforce
Submodule zksforce updated 274 files

0 comments on commit 75a9e01

Please sign in to comment.