Problem in adding new worksheet into google spreadsheet in ios
I m not able to add new worksheet programmatically into google spreadsheet
here is a code that i wrote......
GDataEntryWorksheet *newWorksheet = [GDataEntryWorksheet worksheetEntry];
[newWorksheet setTitle: (GDataTextConstruct*)@"First Sheet"];
[newWorksheet setColumnCount:5];
[newWorksheet setRowCount:20];
NSURL *postURL = [[newWorksheet postLink] URL];
NSLog(@"new worksheet %@",newWorksheet);
NSLog(@"title %@",[newWorksheet title]);
[service fetchEntryByInsertingEntry:newWorksheet forFeedURL:feedURL delegate:self didFinishSelector:@selector(finish)];
but following exception occurs........
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString XMLElement]: unrecognized selector sent to instance 0xe0550'
*** Call stack at first throw:
(
0 CoreFoundation 0x011ecbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x013415c2 objc_exception_throw + 47
2 CoreFoundation 0x011ee6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x0115e366 ___forwarding___ + 966
4 CoreFoundation 0x0115df22 _CF_forwarding_prep_0 + 50
5 FirstGDataExample 0x00053481 -[GDataObject addToElement:XMLElementForObject:] + 286
6 FirstGDataExample 0x00052b54 -[GDataObject addExtensionsToElement:] + 403
7 FirstGDataExample 0x0005308c -[GDataObject XMLElementWithExtensionsAndDefaultName:] + 409
8 FirstGDataExample 0x0000f77d -[GDataEntryBase XMLElement] + 46
9 FirstGDataExample 0x00051645 -[GDataObject XMLDocument] + 36
10 FirstGDataExample 0x0006727d -[GDataServiceBase fetchObjectWithURL: objectClass: objectToPost:ETag:httpMethod:delegate:didFinishSel ector:completionHandler:retryInvocationValue:ticke t:] + 1004
11 CoreFoundation 0x0115d67d __invoking___ + 29
12 CoreFoundation 0x0115d551 -[NSInvocation invoke] + 145
13 FirstGDataExample 0x0006dc18 -[GDataServiceGoogle fetchAuthenticatedObjectWithURL: objectClass: objectToPost:ETag:httpMethod:delegate:didFinishSel ector:completionHandler:] + 1012
14 FirstGDataExample 0x0006e9b0 -[GDataServiceGoogle fetchEntryByInsertingEntry:forFeedURL:delegate:did FinishSelector:] + 182
15 FirstGDataExample 0x00003a43 -[SecondViewController fetchSelectedSpreadsheet:] + 366
16 FirstGDataExample 0x000038cd -[SecondViewController tableView:didSelectRowAtIndexPath:] + 228
17 UIKit 0x00676794 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:noti fyDelegate:] + 1140
18 UIKit 0x0066cd50 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
19 Foundation 0x0037f7f6 __NSFireDelayedPerform + 441
20 CoreFoundation 0x011cdfe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUN CTION__ + 19
21 CoreFoundation 0x011cf594 __CFRunLoopDoTimer + 1220
22 CoreFoundation 0x0112bcc9 __CFRunLoopRun + 1817
23 CoreFoundation 0x0112b240 CFRunLoopRunSpecific + 208
24 CoreFoundation 0x0112b161 CFRunLoopRunInMode + 97
25 GraphicsServices 0x01908268 GSEventRunModal + 217
26 GraphicsServices 0x0190832d GSEventRun + 115
27 UIKit 0x0060f42e UIApplicationMain + 1160
28 FirstGDataExample 0x00002b74 main + 102
29 FirstGDataExample 0x00002b05 start + 53
30 ??? 0x00000001 0x0 + 1
)
in
- (GDataServiceTicket *)fetchAuthenticatedObjectWithURL: (NSURL *)objectURL
objectClass: (Class)objectClass
objectToPost: (GDataObject *)objectToPost
ETag: (NSString *)etag
httpMethod: (NSString *)httpMethod
delegate: (id)delegate
didFinishSelector: (SEL)finishedSelector
completionHandler: (GDataServiceCompletionHandler)completionHandler
method of GDataServiceGoogle class
after excecuting [invocatio invoke] line
plz help where i m wrong..........?
Last edited by Rani; 12-13-2011 at 05:49 AM.
|