adric: books icon (c) 2004 adric.net (Default)
adric ([personal profile] adric) wrote2009-09-05 11:44 pm
Entry tags:

Examine your assumptions

When the computer seem to be cheerfully giving you completely illogical or impossible results, even when you inquire in various roundabout ways, double check your code, paste in someone else's code ... it's a good time to examine your assumptions.

In this particular case it now seems quite obvious that these two things:

thing is a NilClass

thing is a OSX::NSCFDictionary

are not the same thing at all, and not even the same kind of thing. Obvious now and silly, but not quite so much so three levels down when I was trying to puzzle out why I could not get the fields of a hash and kept getting empty strings and harsh language about no such method for nilClass and other rubbish.

Now that I realize that I was asking the same question and getting different answers because different things are answering, I have cleared the mental block and might actually be able to finish implementing this bit of the exercise.

First though, I had a slice of yummy key lime pie. And now back into Cocoa.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org