Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kannn

macrumors newbie
Original poster
Jul 11, 2011
4
0
Hello,

I'm having difficulty with CS193P assignment 2 (foundation calculator), and I can't seem to find any info on it online. This is from the latest, fall 2010 course entitled "developing apps for iOS." If you've completed assignment 2 or are in the process of doing it, please post! I'll be trying to work through it in the next couple of days.

Also, are there other good places for discussing this course?
 

RonC

macrumors regular
Oct 18, 2007
108
0
Chicago-area
Ok, I'll bite (since I always plug this course): what difficulty are you having? I won't solve your problem for you, nor will I share my solution, but I can coach you through your problem.
 
Last edited:

kannn

macrumors newbie
Original poster
Jul 11, 2011
4
0
I just started learning programming, so when I started this assignment, it seemed overwhelming. Mostly, I was looking for a place where it had been discussed already, to help me wrap my head around it.

I've worked through some of it now, but it's still confusing. Here is a specific:

Xcode keeps yelling at me about using instance variables in class methods. I'm trying to enumerate through an expression to create an NSSet.
I've overridden the expression getter to return a NSArray which keeps track of pressed buttons. It still builds fine, but what am I doing wrong here?

Thanks for your help!
 

kannn

macrumors newbie
Original poster
Jul 11, 2011
4
0
hmm.. I did something wrong in getting the internalExpression NSArray using it to set expression as it comes back as null. Again, I just started learning this. This is what I have:

Code:
-(id)expression{
return internalExpression;
}
 
Last edited by a moderator:

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
hmm.. I did something wrong in getting the internalExpression NSArray using it to set expression as it comes back as null. Again, I just started learning this. This is what I have:

Code:
-(id)expression{
return internalExpression;
}

Where do you initialize internalExpression?

BTW The prerequisites stated in lecture 1 include previous object-oriented programming. Do you satisfy that prerequisite?
 
Last edited:

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
If anyone interested, this course free online from Standard at http://www.stanford.edu/class/cs193p

I think I've just found the thing that will get me to bridge my Cocoa knowledge to Cocoa Touch. :)

Also available via iTunes U. Link: http://itunes.apple.com/us/itunes-u/developing-apps-for-ios-hd/id395605774

EDIT: kannn I'd like to suggest that you take a look at the following two links:

http://whathaveyoutried.com and http://www.mikeash.com/getting_answers.html

When asking a question on a forum like this it helps to be as complete as you possibly can. This generally means providing some context for the code snippets you may post. Preferably, if those code snippets are compilable it really helps others see what you are up to and help you better.

B
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.