Board index » delphi » Help getting started (moving from BP/DOS to Delphi)

Help getting started (moving from BP/DOS to Delphi)

I'm looking for a quick and painless way to getting started on Delphi.

I have good knowledge and experience with BP 7.0, using the Turbo
Vision (TV) framework. I have never programmed in windows or win95.

I have Delphi 2.0. I believe there was a "getting started" section in
one of the printed manuals (was it an installation manual?), but in
the six manuals I now am able to relocate, I can't find any such
introduction. I have also browsed the CD and the online help. Have I
missed anything? I also have a book titled "Delphi 2 Unleashed" by C.
Calvert (1996).

I'm having a bit of trouble transferring what I know from the good old
DOS days of BP/TV to Delphi, like how does a button get to know that
it's been pressed and so on.

The project I'm about to start is pretty big, so I need to spend some
time making sure that I understand windows/delphi programming fairly
well before planning the project itself.

What I'd like is the following:
1) An introduction to the IDE (preferably interactive).
2) An introduction to the basic structure of a delphi program.
3) An introduction to windows95 programming.
4) ...and anything that can help me on my way.

Anything that can help me transfer, and delete all that is obsolete,
of what I know from BP/TV/DOS to Delphi/Win95, is very welcome! The
new project is a new version of a program that is written in BP/TV.

Any suggestions?

Andreas Kolsto

(please e-mail a copy of your reply directly to: kol...@ptm.no)

 

Re:Help getting started (moving from BP/DOS to Delphi)


We've just (finally) released the first of our Delphi ports from TV -
if you're coming from Turbo Vision you should have a good start as you
know about event driven programming. Depending on the sort of app you
may be able to retain most of the code that handles processing, and
just replace all the user interface code.

First and most obvious point is that in Delphi every form (window,
dialog) is a separate unit. You can of course also create units that
contain code only - for example string handling functions.

Most of Delphi revolves around event handlers. When you drop an object
on a form you see its properties in the object inspector. There is also
a second tab which lists procedures that are executed when something
happens (they are initially all blank), e.g. OnClick for a button or
menu item, OnChange for an edit line. It comes down to when event x
happens, event handler (procedure) y is called. In TV you create a
button stating what command it will generate, and then have to write a
separate handler somewhere; in Delphi you just fill in the code in the
OnClick procedure which is generated if you double click on the button.
Once you understand this it is much cleaner to code than TV.

The other key difference between TV and Delphi concerns getting data in
and out of dialogs. In TV you (usually) use ExecuteDialog and need to
define a transfer record whose structure maps onto the dialog
components exactly. In Delphi the structure is something like this

 with TMYDialog.Create(Application) do {non autocreate form -  or      
                                   preferred}
 with MyDialog do  {autocreated form}
  try
   Edit1.text:=StringVar1;
   Edit1.text:=StringVar1;
   CheckBox1.Checked:=BoolVar1;
   etc
   ShowModal
   if ModalResult=mrOK then
    begin
     StringVar1:=edit1.text;
     StringVar2:=edit2.text;
     BoolVar1:=CheckBox1.Checked;
     etc
    end;
  finally
   free;
  end;

To keep the code tidier I tend to define record structures that relate
to dialogs in the dialog units and include an Editxxx(var
Rec:TMyRecord) which does much the same as the above. This means that
at the top level the code just says EditSetup(SetupRec) and all this
copying of data in and out of the dialog is done where it belongs, in
the dialog unit.

If you post specific queries here I'm sure that the answers will be
forthcoming.

I hope that this is of some help.

Tony Bryer   www.sda.co.uk

Re:Help getting started (moving from BP/DOS to Delphi)


One other thing you really should look at is string manipulation....

if you look at the zero element...this is a no no in Delphi 2 & 3...i.e.
myString[0]: don't do it...use the length function instead...

also read up on changes to objects...

i.e.

myObject = object...

is now...

myObject=class...

just my 2cents worth

Rick Peterson

Re:Help getting started (moving from BP/DOS to Delphi)


A good text for explaining the differences between structured coding and
even driven coding is a book called the "Delphi 2 Programing Explorer."
This book is written by a group of ace programers including Pascal guru
Jeff Dunteman. This book will make the transition a little bit easier.

Quote
Andreas Kolst? wrote:
> I'm looking for a quick and painless way to getting started on Delphi.

> I have good knowledge and experience with BP 7.0, using the Turbo
> Vision (TV) framework. I have never programmed in windows or win95.

> I have Delphi 2.0. I believe there was a "getting started" section in
> one of the printed manuals (was it an installation manual?), but in
> the six manuals I now am able to relocate, I can't find any such
> introduction. I have also browsed the CD and the online help. Have I
> missed anything? I also have a book titled "Delphi 2 Unleashed" by C.
> Calvert (1996).

> I'm having a bit of trouble transferring what I know from the good old
> DOS days of BP/TV to Delphi, like how does a button get to know that
> it's been pressed and so on.

> The project I'm about to start is pretty big, so I need to spend some
> time making sure that I understand windows/delphi programming fairly
> well before planning the project itself.

> What I'd like is the following:
> 1) An introduction to the IDE (preferably interactive).
> 2) An introduction to the basic structure of a delphi program.
> 3) An introduction to windows95 programming.
> 4) ...and anything that can help me on my way.

> Anything that can help me transfer, and delete all that is obsolete,
> of what I know from BP/TV/DOS to Delphi/Win95, is very welcome! The
> new project is a new version of a program that is written in BP/TV.

> Any suggestions?

> Andreas Kolsto

> (please e-mail a copy of your reply directly to: kol...@ptm.no)

Re:Help getting started (moving from BP/DOS to Delphi)


Hi:
    I think the help system of Delphi 1.0 is better than Delphi 2.0. You
can get some getting started chapter from the help of Delphi 1.0.
    I love Delphi very much. Since you have experience with BP 7.0, you
will find it easy to grasp Delphi since their grammer are very similar.
    Wish you good luck!

A fan of Delphi

Re:Help getting started (moving from BP/DOS to Delphi)


On Thu, 08 Jan 1998 22:25:39 -0500, Filip Cruz <bobg...@ids.net>
wrote:

Quote
>A good text for explaining the differences between structured coding and
>even driven coding is a book called the "Delphi 2 Programing Explorer."
>This book is written by a group of ace programers including Pascal guru
>Jeff Dunteman. This book will make the transition a little bit easier.

>Andreas Kolst? wrote:

>> I'm looking for a quick and painless way to getting started on Delphi.

>> I have good knowledge and experience with BP 7.0, using the Turbo
>> Vision (TV) framework. I have never programmed in windows or win95.

>> I have Delphi 2.0. I believe there was a "getting started" section in
>> one of the printed manuals (was it an installation manual?), but in
>> the six manuals I now am able to relocate, I can't find any such
>> introduction. I have also browsed the CD and the online help. Have I
>> missed anything? I also have a book titled "Delphi 2 Unleashed" by C.
>> Calvert (1996).

>> I'm having a bit of trouble transferring what I know from the good old
>> DOS days of BP/TV to Delphi, like how does a button get to know that
>> it's been pressed and so on.

>> The project I'm about to start is pretty big, so I need to spend some
>> time making sure that I understand windows/delphi programming fairly
>> well before planning the project itself.

>> What I'd like is the following:
>> 1) An introduction to the IDE (preferably interactive).
>> 2) An introduction to the basic structure of a delphi program.
>> 3) An introduction to windows95 programming.
>> 4) ...and anything that can help me on my way.

>> Anything that can help me transfer, and delete all that is obsolete,
>> of what I know from BP/TV/DOS to Delphi/Win95, is very welcome! The
>> new project is a new version of a program that is written in BP/TV.

>> Any suggestions?

>> Andreas Kolsto

>> (please e-mail a copy of your reply directly to: kol...@ptm.no)

Although not directly on topic. As far as understanding Windows
Programming, I found Charles Petzold's "Programming Windows xx"
book(s) invaluable. Delphi adds a layer of "abstraction" to the Win
API but you still will want/need to know it for any kind of
substantial project.

Re:Help getting started (moving from BP/DOS to Delphi)


Andreas,

If you have the money and the time, go take one of the week long
intensive courses.  There are a few around and it would be worth it.
Delphi's spin on OOP and DB programming is a bit different [and better]
but to save time its easier to have someone just show it to you rather
than bang your head against the wall ... thats what teachers are for
after all <G>.  In the long run this will save more time than it costs
by a factor of 10x.

For windows stuff ... get Petzold's book and memorize it.  Otherwise
post to the Delphi WinApi NG and hope that Peter Below answers [his
answers are always right, usually complete, and generally come with some
illustrative code].

Get the Delphi Developers Guide ... and keep it handy.  Get Ray
Lichener's books also.  There is a great book on creating components as
well though I can't remember offhand who wrote it.

There is a lot of 'documentation' in the source code that is NOT in the
online help files.  Don't count a lot on the online help ... with which
Borland has gained a well-deserved bad reputation ... sometimes its
helpful and sometimes not ... mainly its good for reference once you
already know it, but not for learning.

Though these newsgroups are very helpful sometimes, some folks are
rather ... well ... lets just say that a lot of posts don't get answered
by 'Team B' or anyone else.  So, don't count on getting answers from
'Team B'.

However, a lot of the basic questions have already been answered ... so
... you can either use HREF or DejaNews [I've not used the latter] to
see what has already been answered.  In fact, you should go there FIRST
with basic questions since the chances are high that the answer is
there.

Anyway,

Best of luck.

Re:Help getting started (moving from BP/DOS to Delphi)


Quote
In article <34B6A715.6...@pacbell.net>, BobK <ezbo...@pacbell.net> writes:
>There is a lot of 'documentation' in the source code that is NOT in the
>online help files.  Don't count a lot on the online help ... with which
>Borland has gained a well-deserved bad reputation ... sometimes its
>helpful and sometimes not ... mainly its good for reference once you
>already know it, but not for learning.

It's a good idea to look at the both the Borland and WinAPI help files via Help
Topics | Find (and wait for a word list to be loaded) rather than Help Topics |
Index.

Also exploring the help files via the forward and back buttons once you have a
subject often reveals treasures.

I find it difficult to understand how the help files can be so poorly designed
in such a powerful framework.

Alan Lloyd
alangll...@aol.com

Re:Help getting started (moving from BP/DOS to Delphi)


Quote
On Thu, 08 Jan 1998 15:58:06 GMT, Tony Bryer <sd...@ibm.net> wrote:
>Most of Delphi revolves around event handlers.

Over on alt.online-service.delphi we sorta see Delphi revolving around
people and not software...  In fact, we have wonderful places on our
Online Service for specific programming questions, but unfortunately
no one from Borland has volunteered to man a "booth" on www.delphi.com
for Borland Delphi questions...

There are frequent chats in Delphi's Computing & the Net forum that
handle many questions about home PCs and working on the Internet.
It's definitely worth a look!

Quote

>If you post specific queries here I'm sure that the answers will be
>forthcoming.

Actually, posting specific queries to alt.online-service.delphi isn't
the best places for forthcoming answers.  There's a handy FAQ at
http://www.borland.com/devsupport/ and as noted in the header of this
message, there are various usenet groups which are better suited to
handle this sort of specific query.  :)

Quote

>I hope that this is of some help.

>Tony Bryer   www.sda.co.uk

Me too!

Angela Howell
angeh...@delphi.com
http://members.delphi.com/angehowe

Re:Help getting started (moving from BP/DOS to Delphi)


On Thu, 08 Jan 1998 12:45:33 GMT, kol...@ptm.no (Andreas Kolst?)
wrote:

Quote
>I'm looking for a quick and painless way to getting started on Delphi.

Hi there...  For getting started on *Delphi* the **online-service**,
check out www.delphi.com... For the Borland programming application,
try the Developers FAQ at http://www.borland.com/devsupport/

Quote
>What I'd like is the following:
>1) An introduction to the IDE (preferably interactive).
>2) An introduction to the basic structure of a delphi program.
>3) An introduction to windows95 programming.
>4) ...and anything that can help me on my way.

Similarly, getting started on Delphi is best done via an interactive
introduction.
1) Start at "Delphinian"; found at
http://forums.delphi.com/m/main.asp?sigdir=delphinian;
2) The basic structure of Delphi is shown at http://www.delphi.com
3) Windows 95 support is offered at http:/www.delphi.com/computing
4) and all along the way, Delphi's staff and forum managers will be
available and willing to help...  We think you'll like it there!

Quote
>Any suggestions?

Hope to see you soon!!

Quote
>Andreas Kolsto

Angela Howell
angeh...@delphi.com
http://members.delphi.com/angehowe

Re:Help getting started (moving from BP/DOS to Delphi)


Quote
>Over on alt.online-service.delphi we sorta see Delphi revolving around
>people and not software...  In fact, we have wonderful places on our
>Online Service for specific programming questions, but unfortunately
>no one from Borland has volunteered to man a "booth" on www.delphi.com
>for Borland Delphi questions...

{snip}

That was a *very* polite way of reminding Delphi users not to crosspost,
especially to the newsgroups that deal with the Delphi online service in
the UK (created before Borland Delphi).

I'm sure they get very annoyed at times - all of the crossposting is
from "us" to "them", and never the other way around.
--
Jeremy Collins

Re:Help getting started (moving from BP/DOS to Delphi)


Quote
In article <mMkQ7KACaUu0E...@jcollins.demon.co.uk>, Jeremy Collins wrote:
> That was a *very* polite way of reminding Delphi users not to crosspost,

If I'm a guilty party I apologise. I assumed that hitting the reply button
in Virtual Access posted the reply in the group that I was reading from.

As far as I'm aware this is posted to Comp.Lang.Pascal.Delphi.Misc only.

Tony Bryer www.sda.co.uk

Other Threads