I figure since "global" is in the "uses" section of Form1, I'm good to go with using "TestClass" in Proc1. I compile with no errors. When I run my app, I get an "access violation". I rack my brain and use all the google-fu at my disposal to figure out what I'm doing wrong. Cause obviously the fault lies with my code somewhere right? Wrong. I must use a "test := global.TestClass.Create;" in Form1. In order for it to run properly. I completely lose my fucking mind at this point.
In any programming language known to man, something is either visible to you, or it is not visible to you. There is no "well, you can see it at compile time, but not at runtime". If "TestClass.Create;" was NOT in the proper visibility, THE COMPILER SHOULD HAVE THROWN AN ERROR. If "TestClass.Create;" was IN the proper visibility, THE RUNTIME SHOULD HAVE EXECUTED PROPERLY.
I understand when I waste my time because of something I did. I can accept that. What I cannot accept is when someone else wastes my time. The group of monkeys that made CodeGear RAD need to go take a class in compiler theory.

Before anyone bitches at me, please read the paragraph above on visibility, and why the compiler should have thrown an error.
16 comments: