Uli's Web Site
[ Zathras.de - Uli's Web Site ]
Other Sites: Stories
Pix
Abi 2000
Stargate: Resurgence
Lost? Site Map!
 
 
     home | articles | moose | programming | articles >> blog

 Blog
 
 Blog Topics
 
 Archive
 

15 Most Recent [RSS]

 Review: Sherlock
2010-07-28 @073
 
 Playing with Objective C on Debian
2010-05-08 @456
 
 Fruit vs. Obst
2010-05-08 @439
 
 Mixed-language ambiguity
2010-04-15 @994
 
 Uli's 12:07 AM Law
2010-04-12 @881
 
 Uli's 1:24 AM Law
2010-04-12 @874
 
 Uli's 6:28 AM Law
2010-04-12 @869
 
 Uli's 3:57 PM Law
2010-04-12 @867
 
 Uli's 4:41 PM Law
2010-04-12 @864
 
 Uli's 7:25 AM Law
2010-04-12 @862
 
 Uli's 9:36 PM Law
2010-04-12 @861
 
 Typesafe typecasts
2010-04-12 @471
 
 Porting to the Macintosh
2010-04-09 @592
 
 Uli's source code is on Github!
2010-03-05 @986
 
 Downtime on Friday
2010-03-04 @025
 

More...

Uli's 10:23 AM Law

When the compiler gives you an error message like:

2007-08-12 09:57:42.893 MyApp[2088] *** +[MyAppView setArgumentOne:]: selector not recognized
And you know that your objects respond to that message, you dork overlooked the "+" at the start. You moron, you are calling an instance method on the class! If you got this object from an NSDictionary or NSArray, you dim-wit probably somewhere mistyped and stuffed the class into the collection, instead of the object.

In ObjC, classes are objects, too. Even when you don't want them to be. So watch your typing when you're refactoring code and a class list becomes an instance list, and watch what you put in a collection.

 
Created: 2007-08-12 @820 Last change: 2007-08-12 @838 | Home | Admin | Edit
© Copyright 2003-2010 by M. Uli Kusterer, all rights reserved.