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 

Learning Borland's VCL and needing help understanding.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
Verne
Guest





PostPosted: Fri Jul 15, 2005 3:28 pm    Post subject: Learning Borland's VCL and needing help understanding. Reply with quote



Hello all,
I'm a 76 year old who loves this programming and puzzling but having
problems learning this type of C++ and not because of the actual language as
with the discriptions of what I should be doing. Seems I don't learn as
quick or have the magic knowledge to know what they want me to do.

I'm to make a new Project, add a Child Form and a TRichEdit to same.
This was all done and simply but then they want me to add some code to the
MainForm's constuctor. Is this the place that opens as a Void FastCall?
This is where I put it for now. Later I'm to put code into the Header,
Source File in the public section of the same TMainForm class declaration
though a couple of lines have to be changed to do so and lastly to add more
code to the MainUnit.cpp file to its end.

Now I've done this but get hundreds it seems of errors. I'm working
with Borland C++ 6 Developers Guide by Sams. This was recommended but are
all Sams books the same? Do they lead you for a page or two and then forget
you are there? Wish there was someone else who I could learn along with as
I love the puzzling and do have the time. Used to do a lot of C from
Lattice C on the old Amiga and worked over to MSVisual Basic but was advised
to tackle Borland's Builder C++ Enterpise which I have been working with.
Console types seem fairly simple and I've studied Ivor Horton's Learning MS
Visual C++ which is primarily all C++ which gave me a darned good basic
education for console items which also work in Dev C++ and Borland's Builder
but he explains what to do where Sams seem to leave one floating if you
can't read their minds.

Any help out there anywhere? I'll keep trying to figure it out in the
meantime as I don't like getting beat on ths type of work.

Verne


Back to top
Andrue Cope [TeamB]
Guest





PostPosted: Fri Jul 15, 2005 4:24 pm    Post subject: Re: Learning Borland's VCL and needing help understanding. Reply with quote



Verne wrote:

Quote:
I'm to make a new Project, add a Child Form and a TRichEdit to same.
This was all done and simply but then they want me to add some code
to the MainForm's constuctor. Is this the place that opens as a Void
FastCall?

No - although it depends why you use the word 'void'. In C++ a
constructor is a special function that is always called when an object
is 'instantiated' (a posh word for created). It can be recognised by
the facts that:

* It has no return type (not even void)
* The name of the function is the same as the name of the class.

A typical example would be:

__fastcall TfrmMain
::TfrmMain(TComponent* Owner)
: TForm(Owner)
{
// Put stuff here that must be done before the form does
// anything else.
}

FWIW classes can have more than one constructor but only one of them
will be called for a given instantiation. VCL forms don't normally have
more than one constructor unless you as the developer feel that it is
needed.

Quote:
Now I've done this but get hundreds it seems of errors.

Hmmm. How familiar are you with 'C++'? From the initial part of your
message I would have guessed not very but then later on you imply that
you have quite a bit of experience. Developers unfamiliar with C++ can
easily upset the compiler (this is a 'feature' of the language not any
particular vendor's compiler). Then again this is true of 'C'.

Quote:
Sams seem to leave one floating if you can't read their minds.

I'm not familiar with that book myself but if you could post some small
code examples and error messages we can try and help. Generally such
questions should be posted to the cppbuilder.language.cpp section
rather than here, however.
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html

Back to top
Craig Farrell
Guest





PostPosted: Fri Jul 15, 2005 7:10 pm    Post subject: Re: Learning Borland's VCL and needing help understanding. Reply with quote



Hi,

Quote:
Now I've done this but get hundreds it seems of errors.

It is fairly common that one error, especially in headers,
can cascade into many many errors.

I suggest tackling one problem at a time, and posting the
problems here (or .students if that would be more comfortable).
Post little snippits of code and errors along with the problem
description, e.g.

Quote:
The tutorial said I should type in the following...
void __fastcall TForm1::Button1Click(TObject *Sender)
{
RichEdit->Text = "Hello";

But when I compile it there are errors like...
[C++ Error] Unit1.cpp(20): E2451 Undefined symbol 'RichEdit'

The error Message window supports Copy so you can copy one
message (or all with Crtl+A). Seeing the exact error gives the
folks who read this board an almost immediate sense of what's
wrong. If you have 26 errors or hundreds it would only be necessary
to paste the top one or two errors, BTW.


--Craig


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) 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.