Board index » cppbuilder » am I paying for past crimes against components?

am I paying for past crimes against components?

I have written one component in my life and the frustration it
caused me is becoming unbearable.

I wrote a small component that draws a strip chart with upto 5
inputs (scrolling line graph... think lie detector). Stepped
through the helpfiles and made the component a year ago. It works,
everything is good.  The problem comes when I want to add
something to it.  I open up MyComponent.bpk file... do this and
that save the changes, re-compile, install. the component on the
pallet doesn't have the new features.  I have made several
changes over the year, and every time takes me hours of flailing
about with removing, adding, saving, compiling, installing. Sooner
or later the changes are incorporated, but I have idea how I did
it, since it seems to be non-reproducible on subsequent attempts.

I would be SO VERY grateful if someone would write a terse step by
step to make a change in a component within a package file and
get that change into the component that gets called from the
pallet.

Debugging is beyond slow with every change requiring
so much time to be able to get it into a form for testing only
to find out I have to make another change.

please ask me questions if my exact incompetence is not clear.

Andy

 

Re:am I paying for past crimes against components?


Which version of BCB are you using?
Do you close all projects before loading the component pack?
What *exact* steps do you use to load the .bpk file?

A hint for debugging:
I install the component (even if it's only got basic code and then I include
the component source file in a dummy project and make changes there. Make
sure that you statically link it (no runtime packages) and then the code
from your locally compiled version will be used. Then once i've got it
working, I re-load the component and re-compile/install it.
As long as you don't add properties that seems to work ok.

--
Rgds Pete
GenHelp: The Component Writers Help Authoring package
=================================
Web:  www.frasersoft.net

Quote
"Andrew" <andrew_k_jo...@talk21.com> wrote in message

news:3d775fcc$1@newsgroups.borland.com...
Quote

> I have written one component in my life and the frustration it
> caused me is becoming unbearable.

> I wrote a small component that draws a strip chart with upto 5
> inputs (scrolling line graph... think lie detector). Stepped
> through the helpfiles and made the component a year ago. It works,
> everything is good.  The problem comes when I want to add
> something to it.  I open up MyComponent.bpk file... do this and
> that save the changes, re-compile, install. the component on the
> pallet doesn't have the new features.  I have made several
> changes over the year, and every time takes me hours of flailing
> about with removing, adding, saving, compiling, installing. Sooner
> or later the changes are incorporated, but I have idea how I did
> it, since it seems to be non-reproducible on subsequent attempts.

> I would be SO VERY grateful if someone would write a terse step by
> step to make a change in a component within a package file and
> get that change into the component that gets called from the
> pallet.

> Debugging is beyond slow with every change requiring
> so much time to be able to get it into a form for testing only
> to find out I have to make another change.

> please ask me questions if my exact incompetence is not clear.

> Andy

Re:am I paying for past crimes against components?


look at where your getting the PKG file.
you maybe working with one that is not the same one on the palette.
for example many have a folder for their packages then move the final
into another folder.
Quote
Andrew wrote:
> I have written one component in my life and the frustration it
> caused me is becoming unbearable.

> I wrote a small component that draws a strip chart with upto 5
> inputs (scrolling line graph... think lie detector). Stepped
> through the helpfiles and made the component a year ago. It works,
> everything is good.  The problem comes when I want to add
> something to it.  I open up MyComponent.bpk file... do this and
> that save the changes, re-compile, install. the component on the
> pallet doesn't have the new features.  I have made several
> changes over the year, and every time takes me hours of flailing
> about with removing, adding, saving, compiling, installing. Sooner
> or later the changes are incorporated, but I have idea how I did
> it, since it seems to be non-reproducible on subsequent attempts.

> I would be SO VERY grateful if someone would write a terse step by
> step to make a change in a component within a package file and
> get that change into the component that gets called from the
> pallet.

> Debugging is beyond slow with every change requiring
> so much time to be able to get it into a form for testing only
> to find out I have to make another change.

> please ask me questions if my exact incompetence is not clear.

> Andy

Re:am I paying for past crimes against components?


Quote
"Pete Fraser" <pete.fra...@at.frasersoft.dot.net> wrote:
>Which version of BCB are you using?
>Do you close all projects before loading the component pack?
>What *exact* steps do you use to load the .bpk file?

Pete,

I am using C++ Builder 6.0 pro (both updates installed).

- Everything is closed
- component->install package... I select my package from the
list and remove it.
- my component icon disappears from the pallet
- File->Open  navigate to: C:\Program
Files\Development\Borland\CBuilder\Lib\MyComponent.bkp
- double click and the small package viewer appears
- I click compile, and the there is a successful make
- I click install, and a dialogue informs me that
.\MyComponents.bpl has been installed and that
TstripChart.TstripChart has been registered.
- the component icon appears in the pallet
- if I go Component->Install Component... I see MyComponent is
listed again
- I close everything. I open up a new application. I drop in a
stripchart and it does not have the new properties or methods
- I go to an old project with a stripchart in it and the new
properties are not there.

What is of particular trouble right now is that in one of my
setFvalue methods I have a division by zero (divide by a
property that hasn't been set to the default).  So the component
won't even go on to the form. I have fixed the error, but I
can't seem to get the fixed version to be used. When I open a
old project I get a warning of the error with the stripchart
but am allowed to proceed, and I can see that it still the
component without the changes to properties that I had made.

I am very appreciative of you taking this on!
thank you
Andy

Re:am I paying for past crimes against components?


"Remy Lebeau [TeamB]" <gambi...@yahoo.com> wrote:

Quote
>Do you, by chance, have an older version of the package
> located on your system elsewhere?

YES! Thanks so much for the help. There was a MyComponent.bpl
in a ../project/bpl directory.  Once this was removed, the
changes to the component code were seen in the property
inspector.

I basically saved the project (MyComponents.bpk) in a new
directory, and deleted everything else. The files in the
directory mentioned above would not delete until I un-installed
the component from the pallet.  This supports the idea that is
was these that were being loaded not the ones that I had been
making changes to.

I think that the BPL and LIB directories are auto generated when
you use the component wizard.  The directories are placed under
the directory where the component package is saved.  I know I
did not make the BPL and LIB directories myself.

So for now problem seems solved. I will try the debugging tip
that Pete suggested when not altering properties, but just
debugging methods.  But from the step by step description of how
I install a component... is it the right way? What is the best
way to distribute a component (say to other computers)?

Thank you Remy and Pete.
Andy

Re:am I paying for past crimes against components?


"Remy Lebeau [TeamB]" <gambi...@yahoo.com> wrote:

Quote
>Do you, by chance, have an older version of the package
>located on your system elsewhere?

Further problems.  By doing the dance of removing, deleting,
reopening, compiling, installing I seem to be able to get
some changes to take in the component, but not others.

I have a property called FtimeSteps. In the component
constructor setTimeSteps(100) gets called.  If I change this to
setTimeSteps(99) then do the installation dance, I can see that
the property is set to 99 not 100. A new strip chart dropped on to a form has the property set to 99. However there is a method that does not show up during code completion for this component.

stripChart1->clearChart()

is not shown.  addDataPoint, and drawChart are.

TstripChart.h
..
public:
  void __fastcall addDataPoint(int index, double dataPoint);
  void __fastcall drawChart();
  void __fastcall clearChart();
  __fastcall TstripChart(TComponent* Owner);

So I know that changes are being made and the new component is
being installed (I can see that FtimeSteps changes), But the
method clearChart is not an available method of the component.

I can not explain why this is?

Andy

Other Threads