FROM : M. Uli Kusterer
DATE : Sun Nov 28 05:09:49 2004
At 15:51 Uhr -0800 27.11.2004, Dylan McNamee wrote:
>I'm a "big fan" of Cocoa-Java, but I thought I'd explore the other side
>of things in my next project, and delve into Objective-C. I'm finding
>myself reaching for the same little syntax templates, so I wrote a
>reference card to save some time.
>
>If anyone finds it useful, that's great.
Whoa, wish I'd had that when I started out! Well, I'm handing it on
to my sister, who is just working on her first Cocoa app, and making
progress by leaps and bounds... Thanks a lot!
>I'd also appreciate any feedback / errata / suggestions for improvement.
>I do want to keep it to one side of one page, though.
Well, it's great, so I don't really have to offer any important
corrections, but there are four tweaks I could see:
1) It may be handy to mention that @synchronized and @try/@throw are
10.3 and later only. For @try/@throw the old technique was
NS_DURING/[NSException raise]
2) The description of dealloc is kind of misleading. Since reference
card are ideal for beginners, it'd probably be helpful if it
explicitly said that of course only objects retained in instance
variables need to be released in dealloc, not literally *every*
object you just allocate in init.
3) Do we want to mention that you don't actually *have to* implement
an informal protocol? Declaring its interface is enough to make the
names known, which lets you check using respondsToSelector: whether
it's actually implemented.
4) Do we want to also offer an example for calls directly on a string
constant? ([@"String" uppercaseString]; or so) Or is that an
absolutely obvious technique that only took me a while to realize was
of course valid?
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
DATE : Sun Nov 28 05:09:49 2004
At 15:51 Uhr -0800 27.11.2004, Dylan McNamee wrote:
>I'm a "big fan" of Cocoa-Java, but I thought I'd explore the other side
>of things in my next project, and delve into Objective-C. I'm finding
>myself reaching for the same little syntax templates, so I wrote a
>reference card to save some time.
>
>If anyone finds it useful, that's great.
Whoa, wish I'd had that when I started out! Well, I'm handing it on
to my sister, who is just working on her first Cocoa app, and making
progress by leaps and bounds... Thanks a lot!
>I'd also appreciate any feedback / errata / suggestions for improvement.
>I do want to keep it to one side of one page, though.
Well, it's great, so I don't really have to offer any important
corrections, but there are four tweaks I could see:
1) It may be handy to mention that @synchronized and @try/@throw are
10.3 and later only. For @try/@throw the old technique was
NS_DURING/[NSException raise]
2) The description of dealloc is kind of misleading. Since reference
card are ideal for beginners, it'd probably be helpful if it
explicitly said that of course only objects retained in instance
variables need to be released in dealloc, not literally *every*
object you just allocate in init.
3) Do we want to mention that you don't actually *have to* implement
an informal protocol? Declaring its interface is enough to make the
names known, which lets you check using respondsToSelector: whether
it's actually implemented.
4) Do we want to also offer an example for calls directly on a string
constant? ([@"String" uppercaseString]; or so) Or is that an
absolutely obvious technique that only took me a while to realize was
of course valid?
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
| Related mails | Author | Date |
|---|---|---|
| Dylan McNamee | Nov 28, 00:51 | |
| M. Uli Kusterer | Nov 28, 05:09 | |
| Andrew Thompson | Nov 30, 06:40 | |
| Ken Ferry | Nov 30, 21:58 |






Cocoa mail archive

