Expected specifier-qualifier-list before 'NSManagedObjectModel' error and how to fix it

I was putting Core Data into an existing application. I was cutting and pasting a lot from the excellent Apple example, iPhoneCoreDataRecipes. No, this is not a bunch of code examples to show you how to get started with Core Data...but it is a working example of how to get an app up and running with Core Data using SQLite as a back-end persistent store.

So, I was happily cutting and pasting code between iPhoneCoreDataRecipes and my iPhone app (the premium version of FindIt, if you must know) when I ran into the following error everywhere:

Expected specifier-qualifier-list before 'NSManagedObjectModel'


The object changed (i.e. it was not always 'NSManagedObjectModel') but the error was consistent. And yet I was copying everything over from the .m and .h files in the Apple example. Strange.

My first thought was checking that I had included the Core Data framework in the app. Yup. That wasn't it.

Then I realized--it was the global prefix file. I went and checked out the Apple example, and sure enough, Core Data was there. I just needed to through this into my _Prefix.pch file as well, and all the errors went away.

Hope this helps you too!

This year's MacHeist is coming soon / Is Squeeze worth it?

If you are a Mac user, don't miss this year's MacHeist software bundle, due to arrive March 2nd. MacHeist offers great niche software for free or nearly free. I usually find at least one piece of software in the bundle that I end up using regularly. Whatever else, it is cool to get your hands on new, high-quality, low-cost Mac software and take if for a spin.

Right now, MacHeist is offering a free license for LateNiteSoft's Squeeze for Mac. The idea sounds awesome--just like compressing directories on the PC. If you are not aware of the process, file compressors sit in between the OS's file access methods and the file system, and make the files work exactly as they did before, but compressing them on writes and decompressing them on reads on the fly. The amazing part--since physical file access is typically the slowest part of the read or write, compression reduces disk access but increases CPU time. Since CPU is very cheap compared to the physical access, you usually *improve* performance while you are decreasing disk usage. This makes disk compression under most circumstances a no-brainer.

But I had interesting results in using Squeeze. I had a directory of wave files that I tried to compress. The directory was around 200MB. Here is a screen capture of directory information from Path Finder:

Here is what I saw in Squeeze:

Hmmmmm. 22GB saved on a 200MB directory? For some reason, I am skeptical. I am a developer, so I know fairly minor things like this happen--it is no reason to dismiss a piece of software. But this was in addition to the fact that is kept running, and I was not seeing significant compression on any directories. Anybody else have any good or bad stories to relate on Squeeze for Mac?

Windows screen capture utility

You probably run into this situation--you need to take a snapshot of a section of the screen for a million different reasons, either to show someone or document something or include in an email. I probably reach for a tool ten times a day to do this. The Mac and Windows Vista and 7 have this functionality built in; but what about those of us still working on XP at work?

Enter Brian Scott's Cropper. Cropper is a simple, lightweight, and free solution to this problem. Install the app from the download at the like above and launch it. It will place the Cropper icon in your system tray. Then, when needed, you can double click this icon, and pop up a sliding control on the screen to select an area for copying.

I used SnagIt for years and disliked several things--it seemed very bloated and slow to do simple screen captures. Plus, how many times did you highlight the upper left corner and start clicking and dragging only to see you had not gone up high enough or the left far enough? Then, you are pulled into the next screen, to exit out and try again. Painful.

Cropper instead is very cool in that you can use the mouse or keyboard to move the selected area--even performing a "nudge" with the arroe keys. All around great piece of software. Thanks so much, Brian!!!