As mentioned in anoter thread, I am overriding the drawRect function in a subclass of NSOpenGLView. I got it all working, and was trying to create a second NSRect, but the compiler was complaining about my declaration, which was just: NSRect aRect;
I could not figure out what was going on for the longest time. Finally, I just moved the declaration to the top of the function and, like magic, it worked. No problems whatsoever, and the only difference was moving it to the top of the function rather than towards the middle.
Now, as I said, everything is working. But I still don't understand why this was happening. Can someone fill me in on just what was going on? And why did moving the declaration fix the problem?
Thanks alot. I'm learning a ton here, and can't state how strongly I appreciate all the help.
Spencer