Board index » cppbuilder » More property not in object inspector

More property not in object inspector


2005-10-07 09:36:12 AM
cppbuilder57
Looks like I was wrong. I was fooled into thinking I'd found the
problem because after fiddling with some code (the AnsiString on a null
character problem) because the property appeared in the object inspector
of a test project that I loaded immediately after compiling the
components' runtime package. However, if I close BCB (6.0, if it
matters) and then open it again and load the test project, the property
doesn't appear in the object inspector. This is true even after
recompiling the design-time package and uninstalling and then
reinstalling the components in the IDE. However, the property exists,
because it can be changed in code. The only way I can get it to appear
in the object inspector is to recompile the runtime package, and then
reload the project in the same BCB session.
Any idea why this might happen?
Phil
 
 

Re:More property not in object inspector

"Phil Manger" < XXXX@XXXXX.COM >wrote in message
Quote
Looks like I was wrong.
Once again, I ask you to please show the actual code that is not working for
you.
Quote
Any idea why this might happen?
You probably have an older version of the component still installed on your
machine which did not have the property in question. The OI is likely
picking up the older header file instead of the latest one.
Gambit
 

Re:More property not in object inspector

Remy Lebeau (TeamB) wrote:
Quote
"Phil Manger" < XXXX@XXXXX.COM >wrote in message
news:4345d082$ XXXX@XXXXX.COM ...


>Looks like I was wrong.


Once again, I ask you to please show the actual code that is not working for
you.


>Any idea why this might happen?


You probably have an older version of the component still installed on your
machine which did not have the property in question. The OI is likely
picking up the older header file instead of the latest one.


Gambit


I could send the code that pertains to the property, but I don't think
it'll tell you much, because I think the problem might be the way it's
interacting with other properties (which is why I asked if there's a
limit on the number of properties). And the code for the component has
gotten too large to include in an email (almost 1300 lines of code).
There are a number of properties that are used simultaneously by a
formatting function (DateFormat, TimeFormat, DisplayMode, etc.). The
formatting function is called for the Set... method for each of these
properties. What I'm wondering is if the formatting function is failing
because it is attempting to execute before all the properties have been
initialized. Still, I don't see how that would prevent a property from
showing up in the object inspector.
I also thought the problem might be that an older version of the
component is still installed. So I not only uninstalled all the
components in the same package from the IDE, but I went into the
directory containing the code and deleted all the runtime and design
time object and library files and rebuilt them from scratch. Still the
same problem.
Right now I'm going to sleep on it.
Thanks for your quick replies.
Phil
 

{smallsort}

Re:More property not in object inspector

Phil Manger wrote:
Quote

Looks like I was wrong. I was fooled into thinking I'd found the
problem because after fiddling with some code (the AnsiString on a null
character problem) because the property appeared in the object inspector
of a test project that I loaded immediately after compiling the
components' runtime package. However, if I close BCB (6.0, if it
matters) and then open it again and load the test project, the property
doesn't appear in the object inspector.
Sounds like you have 2 copies of the run time bpl. One in the path without the
property and one that is not in the path, but when you recompile it that is the
one the design time package will load. When you close and reload the one in the
path is being found and the property is gone.
Quote
This is true even after
recompiling the design-time package and uninstalling and then
reinstalling the components in the IDE.
The design time package is not what make a property available, it is the run
time one which is where the component is defined.
Quote
However, the property exists,
because it can be changed in code.
Are you statically linking in the code? Sounds like the obj file is in your
search path, but the run time package must be found by the OS on the OS path.
Different things.
Quote
The only way I can get it to appear
in the object inspector is to recompile the runtime package, and then
reload the project in the same BCB session.
You have the package multiple times on your disk.
Quote

Any idea why this might happen?

Phil
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Your friends will know you better in the first minute you meet than your
acquaintances will know you in a thousand years. (R Bach)
 

Re:More property not in object inspector

Jeff Overcash (TeamB) wrote:
Quote

Phil Manger wrote:

>Looks like I was wrong. I was fooled into thinking I'd found the
>problem because after fiddling with some code (the AnsiString on a null
>character problem) because the property appeared in the object inspector
>of a test project that I loaded immediately after compiling the
>components' runtime package. However, if I close BCB (6.0, if it
>matters) and then open it again and load the test project, the property
>doesn't appear in the object inspector.


Sounds like you have 2 copies of the run time bpl. One in the path without the
property and one that is not in the path, but when you recompile it that is the
one the design time package will load. When you close and reload the one in the
path is being found and the property is gone.


>This is true even after
>recompiling the design-time package and uninstalling and then
>reinstalling the components in the IDE.


The design time package is not what make a property available, it is the run
time one which is where the component is defined.


>However, the property exists,
>because it can be changed in code.


Are you statically linking in the code? Sounds like the obj file is in your
search path, but the run time package must be found by the OS on the OS path.
Different things.


>The only way I can get it to appear
>in the object inspector is to recompile the runtime package, and then
>reload the project in the same BCB session.


You have the package multiple times on your disk.


>Any idea why this might happen?
>
>Phil


Thank you, thank you Team B! That was the problem all along. And it
also explains some other weird things that were happening. When I began
modifying the components in the package, I changed the bpi/lib and final
output directories in the project options because I didn't want to mess
up applications that are using the old versions of the components. I
statically link all my applications (which means, that should never have
been a worry, anyway), so the new code was getting linked into the test
projects. The new property wasn't showing up during the design phase
because BCB6 was still loading the old library. I tried fiddling with
the environment options, but BCB6 still kept looking in the old
location. (I changed all the directory paths back to what they were
before, but is there any way to set up BCB so that it looks for
libraries where you want it to look? I know how to get projects to look
in the appropriate directories, but I'm not sure how to get BCB itself
to look where I want it to look.)
Anyway, thanks for all your help and your quick responses. Now I can
get back to fixing the real problems.
Phil