-
TV getting trashier and trashier
Posted on September 26th, 2007 No commentsA show I enjoy watching is Rules of Engagement. I think the writing is good,
but extremely adult and racy. That seems to be the standard today, get in as many sexual references and jokes about sex as possible. I like the relationships between the married couple and between the engaged couple, and yes, David Spade is good too. I really liked Patrick Warburton on Seinfeld and he is terrific as the deadpan husband. Though I recommend the show for adults, if you aren’t one to blush easily, for goodness sake, don’t let your kids watch it.Cassidy had asked me to tape Gossip Girl, which I did, and she watched it on her own this week. When I
asked if I should continue taping it for her she mentioned casually
that it was a bit inappropriate (thank goodness). I skimmed the episode
tonight and decided it was not a show for her. I did not realize it was
much worse than I thought. Tracee over at Blog Fabulous explains why it is garbage. I have decided to
stay away from the CW network, and to never let my kids watch a show
for the first time without supervision. -
Archives in Cocoa
Posted on September 21st, 2007 No commentsIf you need to save and load data from files, and you don’t mind creating binary files (don’t need to read or edit them), then Archives are the simplest way to go.
Load contents of file into an NSArray:
NSArray* m_ProcessedFiles = [NSKeyedUnarchiver unarchiveObjectWithFile:destPath];
Save contents of array to file:
[NSKeyedArchiver archiveRootObject:m_ProcessedFiles toFile:srcPath];
-
objective-c error message: invalid conversion from ‘objc_object*’
Posted on September 19th, 2007 No commentsThis error message had me stumped for a while:
invalid conversion from ‘objc_object*’ to ‘int’
the line in question was something like this:
int iResult = [MyUtils utilsMemberFunc:param1,param2];
it doesn’t matter what the "to" type is, what is important is that you recognize that this message, in this context, is reporting that the utilsMemberFunc declaration was not found and due to objective-c’s dynamic binding it is assuming it returns an objc_object* rather than the type that utilsMemberFunc was declared to return. So why isn’t it finding the declaration? Because I used ‘,’ rather than ‘:’ to separate the parameters. Besides the fact my brain still thinks in C++, I use commas to separate parameters in a variable list alot ( [NSString stringWithFormat:@"%d,%d", num1, num2]).
Through trial and error and comparing similar code that works it finally dawned on me that my syntax was incorrect.
-
Shortcut for renaming a file in Finder
Posted on September 13th, 2007 No commentsIncredibly, it’s taken me until now to learn the equivalent of F2 in Windows to put a filename in "edit" mode in Finder. You simply press the <Enter> key with the appropriate file highlighted. Good Grief.
-
Problem with breakpoints in Xcode
Posted on September 6th, 2007 12 commentsI'm running Xcode 2.4.1
I have an odd breakpoint problem that I have not seen written about. I can set breakpoints no problem, my program will break correctly. My problem is when I run my program again, though the breakpoints appear marked correctly in the UI and in the breakpoint window, none of the breakpoints break. Going to the command-line GDB (GNU debugger) via <Option><Apple> (must be in the debugger window) I type in "break info" and it reports no breakpoints!
Don't know what happened in my environment for this to start occuring but it is very inconvenient to re-enter all my breakpoints on each invocation. I hope I find the problem soon.
Update: I found the "Stop on Debugger()/DebugStr()" command in the Debug window. This will save me, for now, allowing me to break inside some initialization code which runs before I get a chance to set breakpoints. I just insert a Debugger(); call in the code where I want to "break".
Update: Today, Aug 26, 2008, "xcode breakpoint" is appearing at #1 in Google. In case you aren't reading the comments to this post, Aaron's suggestion:
"In xcode go to Preferences, select the page for Debugging then make sure "Load symbols lazily" is NOT selected"
seems to fix many of the breakpoint issues for most people. It didn't address my particular issue that I described in the post (I think my project has gotten corrupted or something), but it did help me in other instances.


