Posts by Christopher Tysh

04 Aug 2009, 00:36
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > StartParsingTweets Warning / Error)

Hey Guys

I am working on the Tweets XML Parsing. When I call the code [self startParsingTweets], I get a warning that I think is crashing my program. The warning says “warning: ‘NSUrlAppDelegate’ may not respond to ‘-startParsingTweets’”

Any ideas why this is popping up? I know that - (void) startParsingTweets isn’t a standard function, so do I need to declare this somewhere else?

Thanks.

04 Aug 2009, 01:25
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > StartParsingTweets Warning / Error)

Yes the Project is called NSUrl, it started off as my testing program for NSUrlConnections

I’m not quite adept at reading the stack trace. I’m getting a “unrecognized selector sent to instance”

I tried declaring the method in the header but that didn’t seem to make a difference…

07 Aug 2009, 00:49
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > NSXmlParser and Twitter)

Can someone please look at page 271 of the eBook and explain to me where / how the startParsingTweets method is supposed to be defined? I’m guessing there is supposed to be something in the header file but there is no mention of it in the book. 

07 Aug 2009, 13:42
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > NSXmlParser and Twitter)

Thank you for the reply.

Can you then explain why I’m getting an error at compile which says “warning: NSMutableData may not respond to -startParsingTweets” ?

If I’m trying to call the method using [myTweetsConnection startParsingTweets], why doesn’t that work?

08 Aug 2009, 00:53
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > How to Break Up Classes?)

Hey Guys

I’m finding this forum very helpful. I’ve started working my first “real” iPhone App and right now everything is beginning to gather in one file. I’m wondering, how do you decide how / where to break up different classes into separate files? Is it enough to just separate into a new file when you have a new screen of data or a new table appear ?

08 Aug 2009, 13:35
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > How to Break Up Classes?)

Maybe I’m talking about the app architecture… So far I’ve got code that is a calling some XML, parsing that XML and putting it into a table. That’s all in one .h/.m file set. Does that seem appropriate?

14 Aug 2009, 01:26
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Nodes with Same Name with NSXMLParser)

I have NSXMLParser working but have a problem where there are several nodes within a parent that have the same name. It looks something like this:

toyota bob

When I currently run NSXMLParser and look for “name”, I get “bob”. If I want to pick out the Car’s Name (toyota), how do I do that?

Thank You.

16 Aug 2009, 05:10
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Nodes with Same Name with NSXMLParser)

Bill, thanks for the reply. I also figured out that I can check

if ([elementName isEqualToString:@”car”])

and then run the check inside of that.

Another question… If I have an element that is bill is there a way to get that id=”1” value out of there?

16 Aug 2009, 05:27
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Parsing HTML)

I am reading some HTML and trying to pull out some specific data. I’m looking for all the links that are tagged as <a name="x1">, <a name="x2">, etc. I want to get the text between the anchor tags, so if the example was <a name="x1">Click Here</a>, I would want to get the “Click Here” text.

I pretty well understand how NSXmlParser works and have been tinkering to get it to work with HTML but haven’t had much luck. Any help would be greatly appreciated.

17 Aug 2009, 13:22
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Parsing HTML)

I’m looking at using componentsSeparatedBy … can someone give a quick example of how to use this properly?

Also I’m trying to use substringWithRange but can’t get anything to NSLog to output, a quick example of this function would also be very helpful.

Thanks, -Chris

18 Aug 2009, 02:06
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Parsing HTML)

NSScanner did the trick. Had to play around with it for a while before I got the hang of it, but now I’m getting the exact data I want.

Thanks for you all of your help.

18 Aug 2009, 21:38
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Planning Ahead for Advertisements)

I am planning to offer a free version of my App. Does anyone have tips for how I should plan ahead / how to implement Advertising? My biggest concern is putting out the App with an Advertising Program and then maybe I want to switch to another Advertising Program later - can I control this remotely and have it show up for everyone that already has downloaded the App without forcing them to download a new version?

Thanks for any input you have.

21 Aug 2009, 04:15
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Replacing Substrings within NSString)

I’ve got some HTML coming in that contains some ` <DIV>tags. I would like to remove these <DIV> tags from the HTML, but the problem is that some of the <DIV> tags have classes or ids defined in them. I can replace the <DIV` portion of the tag, but since there is no wildcard allowed, I don’t know how to get rid of all these tags.

Basically what I would like to do: ` mystring = [mystring stringByReplacingOccurrencesOfString:@”<div*>” withString:@””]; `

Any ideas would be great.

21 Aug 2009, 14:36
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Replacing Substrings within NSString)

I’m looking at NSPredicate but not sure how / if I can work with this to make it do what I’m trying to acheive.

21 Aug 2009, 18:38
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Replacing Substrings within NSString)

I found a couple of functions online that might work out. If these don’t work I’m going to try something with finding the Range of the characters and then removing characters in that rage, or keep hacking at NSScanner.

http://www.alexrude.com/articles/Strip-HTML-Tags-in-Cocoa-Objective-C http://www.rudis.net/content/2009/01/21/flatten-html-content-ie-strip-tags-cocoaobjective-c

22 Aug 2009, 23:53
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Replacing Substrings within NSString)

So you guys know, the code on this page http://www.rudis.net/content/2009/01/21/flatten-html-content-ie-strip-tags-cocoaobjective-c

works to remove the HTML Tags from an NSString.

24 Aug 2009, 23:45
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > How To Make a Full Screen / Email Style Keyboard)

I want to use a full screen / email style keyboard and input field combo. Should I be using MFMailComposeViewController and modifying it? Should I make a custom view?

Am I totally off base here? I am not sure what this style of keyboard view is called.

27 Aug 2009, 20:46
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > How To Make a Full Screen / Email Style Keyboard)

My question is more along the lines of… how do I make a view that scrolls up onto the screen along with the keyboard, much in the same way that a new view scrolls up when you click the “new email” button in the mail app?

28 Aug 2009, 20:08
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > How To Make a Full Screen / Email Style Keyboard)

This sounds along the lines of what I want. Gonna be busy the next few days but will let you know how it turns out.

22 Sep 2009, 00:14
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > UITableView Navigation Bar Buttons)

Hey Guys

I’m sure this is pretty basic but how do I add the pretty little buttons at the top of the Table. I’m talking about the little plus sign or the little “write a new email” symbol.

Thanks, -Chris

22 Sep 2009, 00:40
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > UITableView Navigation Bar Buttons)

I found the basics of how to add a UIBarButtonItem but only figured out how to make a button with text in it, would still like to use some of the premade symbols.

22 Sep 2009, 16:55
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > UITableView Navigation Bar Buttons)

Thanks guys. I will try to look at this tonight but might not have time till Thursday.

16 Oct 2009, 04:41
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Adding NavBar to NIB?)

Hey Guys

This is probably something basic, but I am adding a NIB to my project. I am using it as a modal view and I want to have a standard NavBar at the top of the screen. In Interface Builder I am selecting the View and choosing “Navigation Bar” from the “Top Bar” dropdown. The problem is, when I view the NIB, the Nav Bar is not showing and the entire view seems to be moved upwards, as there is a black gap (about the size of a Nav Bar) between the bottom of the view and the bottom of the screen.

Any ideas would be greatly appreciated.

-Chris

16 Oct 2009, 13:59
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Adding NavBar to NIB?)

Should that read “unless you have a nav controller OR you manually place one from the library.” ?

Thanks for your help.

23 Oct 2009, 02:30
_me02_pragsmall

Christopher Tysh (49 posts)

(from iPhone SDK Development > Passing NSURLConnections / Sessions Through POST ?)

Hey Guys

I am working on an App that logs into an existing PHP website. I am able to send my username / password through and get validated. I am then able to access the secure pages/data within. The problem comes up when I am trying to send POST data through a form page.

I am using the same method that I use to login to the system, but it appears that the POST form is not passing the Session / Cookie through to the receiving page, and thus I am bounced to the error message on the PHP server. After receiving the error message (“connection timed out”), I am still able to go back and navigate through the secure data, which leads me to believe that my session has not actually ended.

Any ideas or insights would be a great help. -Chris

49 posts