开发者

Loading FBconnect graph queries into Three20 TTTableViewDataSource

开发者 https://www.devze.com 2023-03-07 11:13 出处:网络
I\'ve seen the usage of \'TTURLRequest\' and \'requestDidFinishLoad\' for creating DataSource, but how can I use FBconnect \'request:(FBRequest *)request didLoad:(id)result\'?

I've seen the usage of 'TTURLRequest' and 'requestDidFinishLoad' for creating DataSource, but how can I use FBconnect 'request:(FBRequest *)request didLoad:(id)result'?

It won't work like TTURLRequest - won't wait for the dataSource to load and I can't call 'requestDidFinishLoad' at the end of the method because it hasn't a 'TTURLRe开发者_JAVA技巧quest' object with it's data...

Can I do that someway?

Thanks!


i managed to do this and it worked out well. in my TTTableViewDataSource subclass method load:more: i did this to invoke modelDidStartLoad: before initiating the request

[delegates perform:@selector(modelDidStartLoad:) withObject:self];
[fbconnection requestWithGraphPath:.. andParams:.. andDelegate:self];

and the facebook delegate methods request:didLoad: & request:didFailWithError: similarly do, either after successfully reading the response or failing, one of

[delegates perform:@selector(modelDidFinishLoad:) withObject:self];

[delegates perform:@selector(didFailLoadWithError:) withObject:self withObject:error];
0

精彩评论

暂无评论...
验证码 换一张
取 消