Hahah!

May. 22nd, 2005 01:58 am
ibneko: (Default)
[personal profile] ibneko
I've completed my first Cocoa application. Finally. Sheesh. Stupid Objective-C and it's... weird notations. And stupid me, for forgetting everything I knew about classes, public, private, static, etc.

Apple's step-by-step documentation's code had two major bugs in it.
First:
They used:
- (float)convertAmount:(float)amt atRate:(float)rate; [ file | converter.h ]
- (float)convertAmount:(float)amt atRate:(float)rate [ file | converter.m ]
which should be:
+ (float)convertAmount:(float)amt atRate:(float)rate; [ file | converter.h ]
+ (float)convertAmount:(float)amt atRate:(float)rate [ file | converter.h ]

Also, they had two things lowercased... that being the c of Convert in
- (IBAction)Convert:(id)sender [ file | ConverterController.m ]
and c of Converter in
total = [Converter convertAmount:amt atRate:rate]; [ file | ConverterController.m ]

Ok, now that this great.. confusion has been solved, I'm going to go get ready for bed.

I can now randomly convert currencies. Ok, now that I've gotten a general idea of Cocoa, it's time to try to make stuff. I'm open to suggestions... if you're on my friends list, and you use a mac, and there's a _VERY simple_ app that you'd like to see, tell me, and I'll see if it's possible.

[edit]
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/chapter01/chapter_1_section_1.html
That's what I followed. I'd like to note here that Apple has provided a very nice documentation set. 'cause despite the fact that they really didn't need to go though the trouble of doing so, they did it anyways. Granted, there's issues here and there, with lacking bits of information and such, but hey, it's free. Just like all of their other free apps~ It's sufficient for what it's supposed to do. Crazy hacker minded people like me are just picky =^^=

Expand Cut Tags

No cut tags

Profile

ibneko: (Default)
ibneko

Most Popular Tags

Style Credit

Page generated Jul. 24th, 2025 01:48 pm
Powered by Dreamwidth Studios
January 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2021