Latest Episode
 

Go Back   Keith and The Girl Forums Keith and The Girl Forums Talk Shite

Talk Shite General discussion

Reply
 
Thread Tools Display Modes
Old 04-12-2009, 04:35 PM   #101 (permalink)
Administrator
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,654
Quote:
Originally Posted by LondonAsh View Post
The latest source is here: http://files.me.com/ashleymills/rccyze


Attachment 50633

Updates
  • TweetViewCell now draws itself (all text, icon, border, shaded background) - runs super sweet, with no blank rows or slowdown.
  • Displays text as soon as it's loaded, then fetches icons asynchronously and updates the cells when the data arrives.
  • Variable sized cells dependent on the amount of text
  • Added user name to each cell
Still to do:
  • Save the data each time, and reload when the view opens so it doesn't start with a blank screen
  • Show some kind of activity monitor while loading
  • Handle selections (I think this needs a simple built in web browser to view links in tweets - e.g. Keith's dumps)
  • Add some error handling
  • Memory leaks
  • More comments
  • Refresh button
  • Update the list when refreshed, or criteria change.
Good stuff. I already added a refresh in the navigation controller and it does the same when you select other tweets, which works now. I was thinking of giving the activity indicator bit a try today. I'm very interested in your error handling approach. None of my functions have any handling yet so if a url request fails the app crashes.
(Offline)   Reply With Quote
Old 04-12-2009, 04:51 PM   #102 (permalink)
Senior Member
 
LondonAsh's Avatar
 
Join Date: Aug 2006
Location: London
Posts: 227
Are you using asynchronous requests to get the data back? If you do it that way, and there's no response, well, there's just no response. So nothing fails, you just get no data.

If you're sending more than one request (as I did to fetch the icons), the key is to put all your connections into a dictionary so you can find out what it is you were trying to fetch in the first place when you get the data back - and also to store all the data you've received back so far (you'll need to use a CFDictionary though, rather than an NS one, if you want to use an NSURLConnection as a key).

The activity indicator should be simple, if you pop one in the navigation bar. Then you just send it a startAnimating message from connection:didReceiveResponse: and then stopAnimating from connectionDidFinishLoading:

I'll try and add all the remaining stuff and send you the final code tomorrow.
__________________
Twitter: http://twitter.com/ashleymills
Website: ashley-mills.com
iPhone Apps: ashley-mills.com/Home/apps.html
(Offline)   Reply With Quote
Old 04-12-2009, 07:10 PM   #103 (permalink)
Administrator
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,654
Quote:
Originally Posted by LondonAsh View Post
Are you using asynchronous requests to get the data back? If you do it that way, and there's no response, well, there's just no response. So nothing fails, you just get no data.

If you're sending more than one request (as I did to fetch the icons), the key is to put all your connections into a dictionary so you can find out what it is you were trying to fetch in the first place when you get the data back - and also to store all the data you've received back so far (you'll need to use a CFDictionary though, rather than an NS one, if you want to use an NSURLConnection as a key).

The activity indicator should be simple, if you pop one in the navigation bar. Then you just send it a startAnimating message from connection:didReceiveResponse: and then stopAnimating from connectionDidFinishLoading:

I'll try and add all the remaining stuff and send you the final code tomorrow.
I'm having some trouble with the new code, but I'm making progress. In the mean time, I've tackled launching a webview from cell with URLs.

EDIT:
Trouble tackled. Weird navigation controller linking jib jab. All fixed.

Last edited by hayroob; 04-12-2009 at 07:23 PM.
(Offline)   Reply With Quote
Old 04-12-2009, 08:27 PM   #104 (permalink)
Senior Member
 
LondonAsh's Avatar
 
Join Date: Aug 2006
Location: London
Posts: 227
I think I've pretty much finished all on the actual Twitter view itself. I'm off to bed now, but if you need me to work on anything else, or need any help with any of it, let me know, and I'll take a look tomorrow.

Can you pop a new version on rapidshare so I can take a look at how it's hanging together?
(Offline)   Reply With Quote
Old 04-12-2009, 09:09 PM   #105 (permalink)
Administrator
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,654
Quote:
Originally Posted by LondonAsh View Post
I think I've pretty much finished all on the actual Twitter view itself. I'm off to bed now, but if you need me to work on anything else, or need any help with any of it, let me know, and I'll take a look tomorrow.

Can you pop a new version on rapidshare so I can take a look at how it's hanging together?
I'm working on linking to a webview then I'll post it.
(Offline)   Reply With Quote
Old 04-13-2009, 02:01 AM   #106 (permalink)
Administrator
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,654
So heres the latest greatest

RapidShare

Works well.

I need to add formatting to the events with HTML in them
If you jam on the update or other tweets buttons while the view is loading it crashes
I haven't added any real exception handling
I haven't added any activity indicators yet
twitter tab will load URLs but only ones that start with http (this is easy to fix, just haven't done it)


I am using a function
- (void)refTweetsid)sender{
tweets = [[NSMutableArray alloc] initWithCapacity: 100];
iconDict = [[NSMutableDictionary alloc] init];

connections = CFDictionaryCreateMutable(kCFAllocatorDefault,
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
[self loadURL];
}

that reloads the table view and updates the tweets. Works fine, but if you jam on the button that initiates it, it crashes the app. Need to try and debounce the button or modify the app.
__________________
If you like the KATG app feel free to kick in some bucks (or don't)
KATGIPHONE Donation
(Offline)   Reply With Quote
Old 04-13-2009, 07:12 AM   #107 (permalink)
Senior Member
 
picard102's Avatar
 
Join Date: Aug 2006
Location: Toronto, Ontario
Posts: 3,065
Some ideas?
Attached Images
File Type: jpg katg-tweet.jpg (67.3 KB, 78 views)
File Type: jpg katg-next.jpg (56.1 KB, 79 views)
File Type: jpg katg-live.jpg (63.8 KB, 78 views)
File Type: jpg katg-event.jpg (74.7 KB, 79 views)
(Offline)   Reply With Quote
Old 04-13-2009, 08:21 AM   #108 (permalink)
Senior Member
 
LondonAsh's Avatar
 
Join Date: Aug 2006
Location: London
Posts: 227
Here's the final code (I think) for the Twitter view:

http://files.me.com/ashleymills/rccyze

Updates
  • Added in methods to load and save the data when the view appears or disappears, so you don't get a blank screen. Particularly good for slow connections.
  • Fixed a problem with high-bit (foreign) characters in some image URLs
  • Fully commented the code.
  • Added "katg" into search string

If you've got a problem with user interaction when you don't want it, you could set the button.enabled = NO and then back to YES once all the updates are complete.

Let me know if you need any more from me.
(Offline)   Reply With Quote
Old 04-13-2009, 11:56 AM   #109 (permalink)
Administrator
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,654
Quote:
Originally Posted by picard102 View Post
Some ideas?
These are beautiful, I'll be in NY on the 15th so I'd like to talk with you about getting some of these ideas worked into the app.

Some notes until then:
The live show feed doesn't need a refresh button. It checks automatically every 3 minutes.
I think I would like there to be a small button to call up the play button in case the On Air feed indicator fails.
I would like to see your ideas on the feedback tab.
I'm not sure that there's a need to segment the events tab, but I love the icons and row segmentation.
I would like to see what you would do with the event details page.

That background is perfect. Thats going in for sure.
(Offline)   Reply With Quote
Old 04-13-2009, 01:26 PM   #110 (permalink)
Senior Member
 
dzagama's Avatar
 
Join Date: May 2007
Location: pacinian corpuscle.
Posts: 1,868
Quote:
Originally Posted by picard102 View Post
Some ideas?
Wow, that's stunning. Great work.
(Offline)   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -5. The time now is 08:52 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Keith and The Girl