Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Delphi 3 -> Delphi 2005 questions
I have upgraded from Delphi 3 to Delphi 2005 and no huge problems (my
DLLs still compile and work as they should). But I have som questions:

1)  My executables (DLLs) are twice as large when compiled with 2005?
Is there something I have done wrong (all debugging, symbols etc
are off, checked and compared with the settings in Delphi 3)?

2)  In the "Project, Options" dialog I can't change the "Version info"
All the fields are filled in, but greyed out. Can't edit anything

3)  Packages:  Will Delphi 2005 only link in the libraries I have
selected in the "USES" clause, or do I need to add somthing here?
Is there a way to NOT link in libraries that are not used here?

4)  My project (.dpr file) has several forms (.pas/.frm files), and in
Delphi 3 this showed up as "tabs" when the project opens. In 2005
they don't. I have to go to the "View, Project Manager" and open
them each time (to view/edit them). How do I make Delphi 2005
remember that they should be opened (and appear as a "tab" just
as the "Welcome page" and the main proect file (at the top)?

--
Lars-Erik  -  http://home.chello.no/~larse/  -  ICQ 7297605
WinXP, Asus P4PE, 2.53 GHz, Asus V8420 (Ti4200), SB-Live!

Report this thread to moderator Post Follow-up to this message
Old Post
Lars-Erik Østerud
04-26-05 01:59 PM


Re: Delphi 3 -> Delphi 2005 questions
Lars-Erik ������������� wrote:
> 1)  My executables (DLLs) are twice as large when compiled with 2005?
>     Is there something I have done wrong (all debugging, symbols etc
>     are off, checked and compared with the settings in Delphi 3)?

Programs get bigger with each version of Delphi. But they also do a lot
more. Compare the VCL source code for version 3 with the source code for
version 2005. For instance, I don't think Delphi 3 had support for
actions, anchors, constraints, XP visual styles, or dynamic arrays, but
your Delphi 2005 program includes code that uses all of those things.

> 2)  In the "Project, Options" dialog I can't change the "Version info"
>     All the fields are filled in, but greyed out. Can't edit anything

Your DPR file needs to have the following line in it.

{$R *.RES}

> 3)  Packages:  Will Delphi 2005 only link in the libraries I have
>     selected in the "USES" clause, or do I need to add somthing here?
>     Is there a way to NOT link in libraries that are not used here?

Libraries do not go on the "uses" clause. Those are units. And yes,
Delphi will only link those to your program, along with all the units
those units use, recursively. That's the way Delphi has always worked.

Was there something specific you wanted to know about packages?

> 4)  My project (.dpr file) has several forms (.pas/.frm files), and in
>     Delphi 3 this showed up as "tabs" when the project opens. In 2005
>     they don't. I have to go to the "View, Project Manager" and open
>     them each time (to view/edit them). How do I make Delphi 2005
>     remember that they should be opened (and appear as a "tab" just
>     as the "Welcome page" and the main proect file (at the top)?

Have you told Delphi to save the desktop layout? I think it should do
that automatically.


Also, you sent your message to two newsgroups where no one will ever see
it. Here's an explanation:

http://www.cs.wisc.edu/~rkennedy/borland-newsgroups

--
Rob

Report this thread to moderator Post Follow-up to this message
Old Post
Rob Kennedy
04-26-05 01:59 PM


Re: Delphi 3 -> Delphi 2005 questions
Rob Kennedy skrev:

> Programs get bigger with each version of Delphi. But they also do a lot
> more. Compare the VCL source code for version 3 with the source code for
> version 2005. For instance, I don't think Delphi 3 had support for
> actions, anchors, constraints, XP visual styles, or dynamic arrays, but
> your Delphi 2005 program includes code that uses all of those things.

But I donæt use any of those things. Isn't the linker "smart" and
include obly the things that are used? Most DLLs I write doesn't even
have anything that is displayed at all (only backgound processing).
 
>
> Your DPR file needs to have the following line in it.
>
> {$R *.RES}

Explain please, why is this necessary now, but not before?
What does the switch actually do (what is a .RES file)?
Were these file automaticly included in Delphi 3?

> Was there something specific you wanted to know about packages?

Only if I needed to enable it, or if anything I had no use for was
linked in when I compiled with the default settings (need to have all
includes need for running on a PC w/o Delphi, no no unecessary ones)
 
>
> Have you told Delphi to save the desktop layout? I think it should do
> that automatically.

I use the default setup. Where do I check if this is switched on?

> Also, you sent your message to two newsgroups where no one will ever see
> it. Here's an explanation:
>
> http://www.cs.wisc.edu/~rkennedy/borland-newsgroups

Why do they not feed those groups and receive posting from other
servers? Aren't they interested in people using the groups?
(not all news-readers have support for multippel servers)

But they will get spread on server connected to the one I post on
anyway, so actually these groups will exist in several instances (one
at borland's news-server, and one outside borland's news-server :-)

--
Lars-Erik  -  http://home.chello.no/~larse/  -  ICQ 7297605
WinXP, Asus P4PE, 2.53 GHz, Asus V8420 (Ti4200), SB-Live!

Report this thread to moderator Post Follow-up to this message
Old Post
Lars-Erik Østerud
04-26-05 01:59 PM


Re: Delphi 3 -> Delphi 2005 questions
Lars-Erik ������������� wrote:
> Rob Kennedy skrev: 
>
> But I donæt use any of those things.

Yes you do.

> Isn't the linker "smart" and
> include obly the things that are used?

Yes. But the smart linker can't eliminate published properties or
methods because they can be accessed through means that the compiler
cannot detect. Since the compiler can't detect whether they're used, the
linker cannot safely remove them.

Furthermore, just because *you* didn't write code to use certain
features doesn't mean they weren't used. Code for anchors and
constraints gets run every time your forms change size. Code for XP
visual styles is invoked by the mere presence of a manifest file in your
program or your program's directory because the file controls which
version of the common-control DLL gets loaded for your program by the
OS, and the presence of a manifest isn't something the compiler can
detect since it can change after your program is deployed. Code for
actions gets compiled in because whenever a button gets clicked, it
checks its Action property, and if it's assigned, it delegates control
to the action to handle the click. Checking that property requires that
code be compiled in to back that property.

> Most DLLs I write doesn't even
> have anything that is displayed at all (only backgound processing).

Then make sure you're not linking to the Forms unit, directly or
indirectly. That means no Controls unit
 
>
> Explain please, why is this necessary now, but not before?
> What does the switch actually do (what is a .RES file)?
> Were these file automaticly included in Delphi 3?

I have no idea how it worked in Delphi 3; I never had that version.

Your program's version information is stored in a version-information
resource. Read in MSDN about the VS_VERSIONINFO type. The IDE generates
a resource file for your program, and in that file it stores the version
information and the project icon. The $R directive is what tells the
linker to link a resource file to your project. The *.RES part tells the
linker to use the name of the current source file as the base name of
the resource file, so *.RES in Project1.dpr links to Project1.res, but
in SampleProgram.dpr, it links to SampleProgram.res. This reduces the
maintenance required when renaming files.

When you remove the $R line from your project file, Delphi no longer
links the resource to your program, and the IDE no longer allows you to
modify the settings that would be stored in that file.
 
>
> Only if I needed to enable it, or if anything I had no use for was
> linked in when I compiled with the default settings (need to have all
> includes need for running on a PC w/o Delphi, no no unecessary ones)

In that case, I don't think you want to compile with run-time packages
enabled. When you compile that way, any units that are provided by
packages will not be linked into your program. Instead, the package will
be linked to your program dynamically. A package is a DLL. When you
distribute your DLL, you would also need to distribute all the packages
that your DLL requires. That would include vcl90.bpl and rtl90.bpl at
the least.
 
>
> Why do they not feed those groups and receive posting from other
> servers?

You'll have to ask Borland. It was probably discussed in the newsgroups
long ago; check the archives.

> Aren't they interested in people using the groups?

Yes. Use them through Borland's own servers.

Re-adding the groups to your message's distribution list won't change
anything. That's why I remove them from the list in my replies.

> (not all news-readers have support for multippel servers)

Really? I figured that would be a pretty basic feature for anything
written within this decade. Maybe you should consider an upgrade.

> But they will get spread on server connected to the one I post on
> anyway, so actually these groups will exist in several instances (one
> at borland's news-server, and one outside borland's news-server :-)

They won't exist on Borland's server unless you post them directly to
Borland's server. Borland doesn't accept feeds from other news servers.
Your ISP's server harvests messages from Borland's server just like a
regular news reader, so that is beyond Borland's control. Your ISP
accepts messages you post to the Borland newsgroups, and it propagates
them to other Usenet news servers, but since anyone who reads the
Borland groups does so on the Borland server, nobody is going to answer
your questions, so it's futile to continue posting to Borland groups on
non-Borland servers. I'm replying to your message through
alt.comp.lang.borland-delphi.

--
Rob

Report this thread to moderator Post Follow-up to this message
Old Post
Rob Kennedy
04-26-05 09:01 PM


Re: Delphi 3 -> Delphi 2005 questions
Rob Kennedy skrev:
 
>
> I have no idea how it worked in Delphi 3; I never had that version.

The version info, and comment fields (name, author etc) was stored
anyway (and the project has a .res file), and I could edit the
properties. The properties still show in "options" in Delphi 2005,
only problem is I can't edit them (so the .res file IS read, otherwise
the properties would not be shown right). So why are they greyed out
(no files are read only either, I checked to be sure :-)

> When you remove the $R line from your project file, Delphi no longer
> links the resource to your program, and the IDE no longer allows you to
> modify the settings that would be stored in that file.

But it still shows them?  Strange, maybe Delphi 3 automaticly read the
.res file with the same name as the .dpr file (btw: isn't .dpr the
standard Delphi 2005 file type anymore, I can open and edit .dpr
projects from Delphi 3, but the projects are saved in an addition file
as well now).  I'll try to experiment a bit more tomorrow I guess...

> In that case, I don't think you want to compile with run-time packages
> enabled. When you compile that way, any units that are provided by

What should be on/off then. I have the standard setting. The upper
half of the dialog is enable (run-time stuff), the lower bit (a
check-box, havn't got Delphi on my system here right now) is not
checked, and all the packages listed under that is greyed out.

I send my DLL to someone to test, and it worked OK (but it has no
fancy stuff, on some BDE database stuff, must I inlcude more to
convert the database stuff to dBgo - does that need any packages)

> Re-adding the groups to your message's distribution list won't change
> anything. That's why I remove them from the list in my replies.

They show up on the news-server I post to, so then maybe somone sees
them there at least (there are postings locally on that server too).
There might be some other programmers on out local server :-))))

> Really? I figured that would be a pretty basic feature for anything
> written within this decade. Maybe you should consider an upgrade.

It's on the way (they have only had a LONG delay, grrr :-)
I wouldn't exchange Forte Agent for any other news-reader.

(anyway, in Norway the largest ISP is shutting down it's news-server
now, claiming that "news" is dead and that no one uses it anymore :-)

--
Lars-Erik  -  http://home.chello.no/~larse/  -  ICQ 7297605
WinXP, Asus P4PE, 2.53 GHz, Asus V8420 (Ti4200), SB-Live!

Report this thread to moderator Post Follow-up to this message
Old Post
Lars-Erik Østerud
04-27-05 01:58 AM


Re: Delphi 3 -> Delphi 2005 questions
Lars-Erik ������������� wrote:
> (btw: isn't .dpr the standard Delphi 2005 file type anymore, I can
> open and edit .dpr projects from Delphi 3, but the projects are saved
> in an addition file as well now).

Delphi projects now use two files. One is the same old DPR that it has
always used. The other is the BDSPROJ file, which augments the DPR file
(and DPK files, if you're writing packages). It lets Delphi distinguish
between Win32 and .Net projects, and it also uses XML to keep settings
separate, allowing for future versions to use the same format without
adding even more files to the mix.
 
>
> What should be on/off then. I have the standard setting. The upper
> half of the dialog is enable (run-time stuff), the lower bit (a
> check-box, havn't got Delphi on my system here right now) is not
> checked, and all the packages listed under that is greyed out.

That's exactly how it should be. The upper half only controls which
design-time packages are loaded in the IDE -- which components are
available to you on the Tool Palette (nee Component Palette). The lower
portion of the dialog controls which run-time packages get linked to
your compiled program.

> I send my DLL to someone to test, and it worked OK (but it has no
> fancy stuff, on some BDE database stuff, must I inlcude more to
> convert the database stuff to dBgo - does that need any packages)

I know nothing about the BDE or DbGo. Sorry.

--
Rob

Report this thread to moderator Post Follow-up to this message
Old Post
Rob Kennedy
04-27-05 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Delphi archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:33 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.