I have been away from BCB开发者_JAVA百科 for over five years, and now I am having a st00pid n00b moment.
I am using BCB, and using a VCL component package for which I have the Delphi source.
I want to comment out a few lines in the Delphi source of the component (to not add a few toolbars in a form's OnCreate()).
So, I comment it out, and the syntax highlighting shows it as a comment. I build my package, just to make sure it gets recompiled and my out-commenting didn't work.
I breakpoint on the line before, step and the code which is commented out in the edit is executed (as if it is picking up an old OBJ ?).
What's my checklist here?
The answer will be awarded to whoever leads me to that D'oh!
moment. Thanks
Well you're obviously linking to old code. You'll need to figure out what you're linking against and fix it.
Does your application list the Delphi package in it's "Build with runtime packages" list? If so, you're linking to the code in the delphi package, re-build that. The file you're interested in is the "BPL" file (that's the file you need to rebuild). Sometimes packages automagically build themselves (if they're marked as "Always Build") - but you're talking about an Delphi package used by BCB, maybe the magic is not that strong.
If you are not linking to the BPL then you're linking to the compiled version of the unit, a DCU or an OBJ, I don't work with BCB so I can't tell. Is the PAS file part of your project? If it's not part of your project then you're using the compiled unit and, as far as the IDE is concerned, you happen to be looking at a text file that has the same name as your compiled file (DCU or OBJ). Add the file to the project!
Is BCB actually capable of compiling PAS files? If it's not then you'd need to compile the PAS file using it's native compiler (Delphi). Maybe you've got a C++ only BCB that can't compile PAS files? Not sure such a version exists, but then again I've only been exposed to Delphi-only or RAD Studio environments.
精彩评论