BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Upgrading custom component from BCB3 to BCB6

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development)
View previous topic :: View next topic  
Author Message
Kathleen Beaumont
Guest





PostPosted: Mon Feb 02, 2004 1:06 am    Post subject: Upgrading custom component from BCB3 to BCB6 Reply with quote



I have a set of components that were developed for a project in BCB3,
which I would like to load into the palette for BCB6.

I do not have experience writing components. Can somebody point me to
help files/white papers/old newsgroup postings that may help me get
these installed into BCB6?

FWIW, these were installed into BCB3 using Component | Install Component
and not Install Package.

Symptoms and side effects:

When I open my BCB6 DCLUSR.bpk and attempt to Install Component with one
of the .PAS files, the compiler issues errors such as:

Code:
if Value and FDataLink.DataSourceFixed then
DatabaseError(SDataSourceFixed);
Error:
(Pascal Error) Undeclared identifier: 'SDataSourceFixed'

Code:
FKeyValue := Null;
Error:
(Pascal Error) Undeclared identifier: 'Null'

Thanks for your help.

Kathleen Beaumont

Back to top
OBones
Guest





PostPosted: Mon Feb 02, 2004 2:18 am    Post subject: Re: Upgrading custom component from BCB3 to BCB6 Reply with quote



Kathleen Beaumont wrote:

Quote:
I do not have experience writing components. Can somebody point me to
help files/white papers/old newsgroup postings that may help me get
these installed into BCB6?

FWIW, these were installed into BCB3 using Component | Install Component
and not Install Package.
You should create a package for your components, installing them in

DCLUSR isn't a good idea as it is not easy to transport them.

Quote:
Symptoms and side effects:

When I open my BCB6 DCLUSR.bpk and attempt to Install Component with one
of the .PAS files, the compiler issues errors such as:

Code:
if Value and FDataLink.DataSourceFixed then
DatabaseError(SDataSourceFixed);
Error:
(Pascal Error) Undeclared identifier: 'SDataSourceFixed'
Well, start looking for where SDataSourceFixed is


Quote:
Code:
FKeyValue := Null;
Error:
(Pascal Error) Undeclared identifier: 'Null'
Well, AFAIK, Null never existed in Pascal for the purpose of pointers.

You must use nil.

To me it seems your code doesn't even compile for a start. That's quite
surprising.
But as usual, I may be wrong...


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Feb 02, 2004 4:48 am    Post subject: Re: Upgrading custom component from BCB3 to BCB6 Reply with quote



"Kathleen Beaumont" <kathleen (AT) catalinasystems (DOT) com> wrote

Quote:
I have a set of components that were developed for a project
in BCB3, which I would like to load into the palette for BCB6.

Whatever steps you took in BCB3 to install the component still apply in BCB6
as well. You cannot use the existing BCB3 package(s), you need to recompile
the component source code into a new BCB6-generated package first.
Depending on the actual component source code, you may or may not have to
re-write the code itself as well, to account for the many differences in the
VCL and compiler between the versions.

Quote:
(Pascal Error) Undeclared identifier: 'SDataSourceFixed'

You need to add "VDBConsts" to your 'uses' clause.

Quote:
(Pascal Error) Undeclared identifier: 'Null'

The Null variable was moved from the "System" unit to the "Variants" unit,
so you need to add "Variants" to your 'uses' clause.


Gambit



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Feb 02, 2004 4:50 am    Post subject: Re: Upgrading custom component from BCB3 to BCB6 Reply with quote


"OBones" <obones_fff_ (AT) meloo_fdf_ (DOT) com> wrote


Quote:
Well, AFAIK, Null never existed in Pascal

Yes, it did. It was a global Variant variable that was declared in the
System unit. Now it has been moved into the Variants unit instead, and
changed into a function instead of a variable.


Gambit



Back to top
OBones
Guest





PostPosted: Mon Feb 02, 2004 11:28 pm    Post subject: Re: Upgrading custom component from BCB3 to BCB6 Reply with quote

Remy Lebeau (TeamB) wrote:

Quote:
"OBones" <obones_fff_ (AT) meloo_fdf_ (DOT) com> wrote in message
news:401db355$1 (AT) newsgroups (DOT) borland.com...


Well, AFAIK, Null never existed in Pascal


Yes, it did. It was a global Variant variable that was declared in the
System unit. Now it has been moved into the Variants unit instead, and
changed into a function instead of a variable.

Oh ok.

I stand corrected then.


Back to top
Craig Farrell
Guest





PostPosted: Mon Feb 02, 2004 11:30 pm    Post subject: Re: Upgrading custom component from BCB3 to BCB6 Reply with quote

Hi,

I suggest creating a new component and package to use
as a guide. For example, if your BCB3 component derived
from TDBComboBox, then in BCB6, do Component | New Component
and derive TMyBCB6DBComboBox from TDBComboBox and install it
into a new package. Then use that generated code and package
project as a guide for things like the 'Requires' list, and where
in the source, you will need to make manual additions to the BCB3
code, e.g. you will have to add...

#pragma package(smart_init)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.