How to automatically add the scope name to the delphi library unit?Is there any simple automated way of finding out all the source files associated with a Delphi project?Any tool to suggest unit reference automatically for Delphi 2010?How to reorganize the folder structure of my units in Delphi?Adding a unit to the uses clauses of all units in a project?How to remove unused units from all source files on Delphi XE2?Delphi XE custom build target is always disabledHow do I change a VCL unit in Delphi (XE2)?Stop Delphi automatically adding units incorrectlyStop the IDE from adding uses units automaticallyDelphi Prompt to Add to Uses
How can I finally understand the confusing modal verb "мочь"?
Is throwing dice a stochastic or a deterministic process?
Two denim hijabs
Which version of the Squat Nimbleness feat is correct?
How long did it take Captain Marvel to travel to Earth?
While drilling into kitchen wall, hit a wire - any advice?
Game artist computer workstation set-up – is this overkill?
Picking a theme as a discovery writer
How long does it take a postcard to get from USA to Germany?
Can anyone identify this unknown 1988 PC card from The Palantir Corporation?
What do you call a painting painted on a wall?
Can you figure out this language?
Why can't argument be forwarded inside lambda without mutable?
Hostile Divisor Numbers
Collision domain question
How to deal with employer who keeps me at work after working hours
How to say something covers all the view up to the horizon line?
The selling of the sheep
Python 3 - simple temperature program version 1.3
How is Pauli's exclusion principle still valid in these cases?
What word describes the sound of an instrument based on the shape of the waveform of its sound?
What does のそ mean on this picture?
Determine if a grid contains another grid
Is there any other simpler way to draw the following cross section?
How to automatically add the scope name to the delphi library unit?
Is there any simple automated way of finding out all the source files associated with a Delphi project?Any tool to suggest unit reference automatically for Delphi 2010?How to reorganize the folder structure of my units in Delphi?Adding a unit to the uses clauses of all units in a project?How to remove unused units from all source files on Delphi XE2?Delphi XE custom build target is always disabledHow do I change a VCL unit in Delphi (XE2)?Stop Delphi automatically adding units incorrectlyStop the IDE from adding uses units automaticallyDelphi Prompt to Add to Uses
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a Delphi 6 source code, and I'm migrating it to Delphi 10.2.
In Delphi 6, the delphi library unit name (declared at the uses clause), there is no unit scope name like on Delphi 10.2. Therefore, I need to add unit scope name.
Example:
// In Delphi 6
uses Windows, SysUtils, Dialogs;
// In Delphi 10.2
uses Winapi.Windows, System.SysUtils, Vcl.Dialogs;
How to add unit scope name automatically for all project source files?
I tried the GExperts -> Uses Clause Manager function, it works well, but works only on one file.
I expect to add unit scope name automatically to all project source files.
delphi gexperts
|
show 1 more comment
I have a Delphi 6 source code, and I'm migrating it to Delphi 10.2.
In Delphi 6, the delphi library unit name (declared at the uses clause), there is no unit scope name like on Delphi 10.2. Therefore, I need to add unit scope name.
Example:
// In Delphi 6
uses Windows, SysUtils, Dialogs;
// In Delphi 10.2
uses Winapi.Windows, System.SysUtils, Vcl.Dialogs;
How to add unit scope name automatically for all project source files?
I tried the GExperts -> Uses Clause Manager function, it works well, but works only on one file.
I expect to add unit scope name automatically to all project source files.
delphi gexperts
Why not specify the unit scope names in the project options, at least for now? This migration is complicated and you may as well concentrate on the substance first. Deal with unit scope names at the very end.
– David Heffernan
Mar 23 at 7:55
@DavidHeffernan Although I specify the unit scope name in project options, when opening a source file (created by Delphi 6), unit scope name is still not automatically added. It looks like this setting only works for source files that are created on Delphi 10.2.
– Loi
Mar 23 at 8:51
Unit scope names in project don't work that way. Read the docs again.
– David Heffernan
Mar 23 at 8:54
@DavidHeffernan You are right, can specify unit scope names in project options, although compile time will be slower than specify unit scope names in the source code.
– Loi
Mar 23 at 9:57
1
It depends on the code for compile time. It's not something that has affected me. In any case, for your migtation project it will be simpler if you keep the changes to a minimum while you migrate. Once you are happy, then consider applying source code wide changes to add unit scope names.
– David Heffernan
Mar 23 at 10:31
|
show 1 more comment
I have a Delphi 6 source code, and I'm migrating it to Delphi 10.2.
In Delphi 6, the delphi library unit name (declared at the uses clause), there is no unit scope name like on Delphi 10.2. Therefore, I need to add unit scope name.
Example:
// In Delphi 6
uses Windows, SysUtils, Dialogs;
// In Delphi 10.2
uses Winapi.Windows, System.SysUtils, Vcl.Dialogs;
How to add unit scope name automatically for all project source files?
I tried the GExperts -> Uses Clause Manager function, it works well, but works only on one file.
I expect to add unit scope name automatically to all project source files.
delphi gexperts
I have a Delphi 6 source code, and I'm migrating it to Delphi 10.2.
In Delphi 6, the delphi library unit name (declared at the uses clause), there is no unit scope name like on Delphi 10.2. Therefore, I need to add unit scope name.
Example:
// In Delphi 6
uses Windows, SysUtils, Dialogs;
// In Delphi 10.2
uses Winapi.Windows, System.SysUtils, Vcl.Dialogs;
How to add unit scope name automatically for all project source files?
I tried the GExperts -> Uses Clause Manager function, it works well, but works only on one file.
I expect to add unit scope name automatically to all project source files.
delphi gexperts
delphi gexperts
edited Apr 8 at 13:28
Loi
asked Mar 23 at 4:22
LoiLoi
615
615
Why not specify the unit scope names in the project options, at least for now? This migration is complicated and you may as well concentrate on the substance first. Deal with unit scope names at the very end.
– David Heffernan
Mar 23 at 7:55
@DavidHeffernan Although I specify the unit scope name in project options, when opening a source file (created by Delphi 6), unit scope name is still not automatically added. It looks like this setting only works for source files that are created on Delphi 10.2.
– Loi
Mar 23 at 8:51
Unit scope names in project don't work that way. Read the docs again.
– David Heffernan
Mar 23 at 8:54
@DavidHeffernan You are right, can specify unit scope names in project options, although compile time will be slower than specify unit scope names in the source code.
– Loi
Mar 23 at 9:57
1
It depends on the code for compile time. It's not something that has affected me. In any case, for your migtation project it will be simpler if you keep the changes to a minimum while you migrate. Once you are happy, then consider applying source code wide changes to add unit scope names.
– David Heffernan
Mar 23 at 10:31
|
show 1 more comment
Why not specify the unit scope names in the project options, at least for now? This migration is complicated and you may as well concentrate on the substance first. Deal with unit scope names at the very end.
– David Heffernan
Mar 23 at 7:55
@DavidHeffernan Although I specify the unit scope name in project options, when opening a source file (created by Delphi 6), unit scope name is still not automatically added. It looks like this setting only works for source files that are created on Delphi 10.2.
– Loi
Mar 23 at 8:51
Unit scope names in project don't work that way. Read the docs again.
– David Heffernan
Mar 23 at 8:54
@DavidHeffernan You are right, can specify unit scope names in project options, although compile time will be slower than specify unit scope names in the source code.
– Loi
Mar 23 at 9:57
1
It depends on the code for compile time. It's not something that has affected me. In any case, for your migtation project it will be simpler if you keep the changes to a minimum while you migrate. Once you are happy, then consider applying source code wide changes to add unit scope names.
– David Heffernan
Mar 23 at 10:31
Why not specify the unit scope names in the project options, at least for now? This migration is complicated and you may as well concentrate on the substance first. Deal with unit scope names at the very end.
– David Heffernan
Mar 23 at 7:55
Why not specify the unit scope names in the project options, at least for now? This migration is complicated and you may as well concentrate on the substance first. Deal with unit scope names at the very end.
– David Heffernan
Mar 23 at 7:55
@DavidHeffernan Although I specify the unit scope name in project options, when opening a source file (created by Delphi 6), unit scope name is still not automatically added. It looks like this setting only works for source files that are created on Delphi 10.2.
– Loi
Mar 23 at 8:51
@DavidHeffernan Although I specify the unit scope name in project options, when opening a source file (created by Delphi 6), unit scope name is still not automatically added. It looks like this setting only works for source files that are created on Delphi 10.2.
– Loi
Mar 23 at 8:51
Unit scope names in project don't work that way. Read the docs again.
– David Heffernan
Mar 23 at 8:54
Unit scope names in project don't work that way. Read the docs again.
– David Heffernan
Mar 23 at 8:54
@DavidHeffernan You are right, can specify unit scope names in project options, although compile time will be slower than specify unit scope names in the source code.
– Loi
Mar 23 at 9:57
@DavidHeffernan You are right, can specify unit scope names in project options, although compile time will be slower than specify unit scope names in the source code.
– Loi
Mar 23 at 9:57
1
1
It depends on the code for compile time. It's not something that has affected me. In any case, for your migtation project it will be simpler if you keep the changes to a minimum while you migrate. Once you are happy, then consider applying source code wide changes to add unit scope names.
– David Heffernan
Mar 23 at 10:31
It depends on the code for compile time. It's not something that has affected me. In any case, for your migtation project it will be simpler if you keep the changes to a minimum while you migrate. Once you are happy, then consider applying source code wide changes to add unit scope names.
– David Heffernan
Mar 23 at 10:31
|
show 1 more comment
1 Answer
1
active
oldest
votes
You can add scopes on a per-project basis under the menu Project->Options, select "Delphi Compiler" then "Unit scope names" in the right pane.
Your solution is the same as DavidHeffernan. Thank you for giving me an opinion.
– Loi
Mar 25 at 12:58
since Delphi 6 storage of the project has changed. The .dpr file is not alone, and comes with a .dproj file which contains many additional informations including the unit scopes. However, "upgrading" a .dpr only project create an empty dproj without any of the default unit scopes for VCL projects. So, either you need to put by hand for each project the list of default unit scopes for the VCL target, or create an empty VCL project, and add all your forms/units one by one.
– wesson
Mar 25 at 16:12
Thanks for your suport. I open a Delphi 6 project in Delphi 10.2 IDE, *.dproj is created. That file have a <DCC_Namespace> node = [Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi]. It mean unit scope name is added. So I think it is not different from David Heffernan's solution.
– Loi
Mar 31 at 10:06
Ok. So I'm left with no other suggestion other than thinking that the default set of unit scopes is different depending on the project. So the auto-filled default may need to be completed when upgrading a project from Delphi 6 to XE 10.2+. In anyway, this need to be addressed on a per-project basis.
– wesson
Apr 2 at 8:42
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310592%2fhow-to-automatically-add-the-scope-name-to-the-delphi-library-unit%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can add scopes on a per-project basis under the menu Project->Options, select "Delphi Compiler" then "Unit scope names" in the right pane.
Your solution is the same as DavidHeffernan. Thank you for giving me an opinion.
– Loi
Mar 25 at 12:58
since Delphi 6 storage of the project has changed. The .dpr file is not alone, and comes with a .dproj file which contains many additional informations including the unit scopes. However, "upgrading" a .dpr only project create an empty dproj without any of the default unit scopes for VCL projects. So, either you need to put by hand for each project the list of default unit scopes for the VCL target, or create an empty VCL project, and add all your forms/units one by one.
– wesson
Mar 25 at 16:12
Thanks for your suport. I open a Delphi 6 project in Delphi 10.2 IDE, *.dproj is created. That file have a <DCC_Namespace> node = [Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi]. It mean unit scope name is added. So I think it is not different from David Heffernan's solution.
– Loi
Mar 31 at 10:06
Ok. So I'm left with no other suggestion other than thinking that the default set of unit scopes is different depending on the project. So the auto-filled default may need to be completed when upgrading a project from Delphi 6 to XE 10.2+. In anyway, this need to be addressed on a per-project basis.
– wesson
Apr 2 at 8:42
add a comment |
You can add scopes on a per-project basis under the menu Project->Options, select "Delphi Compiler" then "Unit scope names" in the right pane.
Your solution is the same as DavidHeffernan. Thank you for giving me an opinion.
– Loi
Mar 25 at 12:58
since Delphi 6 storage of the project has changed. The .dpr file is not alone, and comes with a .dproj file which contains many additional informations including the unit scopes. However, "upgrading" a .dpr only project create an empty dproj without any of the default unit scopes for VCL projects. So, either you need to put by hand for each project the list of default unit scopes for the VCL target, or create an empty VCL project, and add all your forms/units one by one.
– wesson
Mar 25 at 16:12
Thanks for your suport. I open a Delphi 6 project in Delphi 10.2 IDE, *.dproj is created. That file have a <DCC_Namespace> node = [Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi]. It mean unit scope name is added. So I think it is not different from David Heffernan's solution.
– Loi
Mar 31 at 10:06
Ok. So I'm left with no other suggestion other than thinking that the default set of unit scopes is different depending on the project. So the auto-filled default may need to be completed when upgrading a project from Delphi 6 to XE 10.2+. In anyway, this need to be addressed on a per-project basis.
– wesson
Apr 2 at 8:42
add a comment |
You can add scopes on a per-project basis under the menu Project->Options, select "Delphi Compiler" then "Unit scope names" in the right pane.
You can add scopes on a per-project basis under the menu Project->Options, select "Delphi Compiler" then "Unit scope names" in the right pane.
answered Mar 25 at 9:38
wessonwesson
112
112
Your solution is the same as DavidHeffernan. Thank you for giving me an opinion.
– Loi
Mar 25 at 12:58
since Delphi 6 storage of the project has changed. The .dpr file is not alone, and comes with a .dproj file which contains many additional informations including the unit scopes. However, "upgrading" a .dpr only project create an empty dproj without any of the default unit scopes for VCL projects. So, either you need to put by hand for each project the list of default unit scopes for the VCL target, or create an empty VCL project, and add all your forms/units one by one.
– wesson
Mar 25 at 16:12
Thanks for your suport. I open a Delphi 6 project in Delphi 10.2 IDE, *.dproj is created. That file have a <DCC_Namespace> node = [Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi]. It mean unit scope name is added. So I think it is not different from David Heffernan's solution.
– Loi
Mar 31 at 10:06
Ok. So I'm left with no other suggestion other than thinking that the default set of unit scopes is different depending on the project. So the auto-filled default may need to be completed when upgrading a project from Delphi 6 to XE 10.2+. In anyway, this need to be addressed on a per-project basis.
– wesson
Apr 2 at 8:42
add a comment |
Your solution is the same as DavidHeffernan. Thank you for giving me an opinion.
– Loi
Mar 25 at 12:58
since Delphi 6 storage of the project has changed. The .dpr file is not alone, and comes with a .dproj file which contains many additional informations including the unit scopes. However, "upgrading" a .dpr only project create an empty dproj without any of the default unit scopes for VCL projects. So, either you need to put by hand for each project the list of default unit scopes for the VCL target, or create an empty VCL project, and add all your forms/units one by one.
– wesson
Mar 25 at 16:12
Thanks for your suport. I open a Delphi 6 project in Delphi 10.2 IDE, *.dproj is created. That file have a <DCC_Namespace> node = [Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi]. It mean unit scope name is added. So I think it is not different from David Heffernan's solution.
– Loi
Mar 31 at 10:06
Ok. So I'm left with no other suggestion other than thinking that the default set of unit scopes is different depending on the project. So the auto-filled default may need to be completed when upgrading a project from Delphi 6 to XE 10.2+. In anyway, this need to be addressed on a per-project basis.
– wesson
Apr 2 at 8:42
Your solution is the same as DavidHeffernan. Thank you for giving me an opinion.
– Loi
Mar 25 at 12:58
Your solution is the same as DavidHeffernan. Thank you for giving me an opinion.
– Loi
Mar 25 at 12:58
since Delphi 6 storage of the project has changed. The .dpr file is not alone, and comes with a .dproj file which contains many additional informations including the unit scopes. However, "upgrading" a .dpr only project create an empty dproj without any of the default unit scopes for VCL projects. So, either you need to put by hand for each project the list of default unit scopes for the VCL target, or create an empty VCL project, and add all your forms/units one by one.
– wesson
Mar 25 at 16:12
since Delphi 6 storage of the project has changed. The .dpr file is not alone, and comes with a .dproj file which contains many additional informations including the unit scopes. However, "upgrading" a .dpr only project create an empty dproj without any of the default unit scopes for VCL projects. So, either you need to put by hand for each project the list of default unit scopes for the VCL target, or create an empty VCL project, and add all your forms/units one by one.
– wesson
Mar 25 at 16:12
Thanks for your suport. I open a Delphi 6 project in Delphi 10.2 IDE, *.dproj is created. That file have a <DCC_Namespace> node = [Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi]. It mean unit scope name is added. So I think it is not different from David Heffernan's solution.
– Loi
Mar 31 at 10:06
Thanks for your suport. I open a Delphi 6 project in Delphi 10.2 IDE, *.dproj is created. That file have a <DCC_Namespace> node = [Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi]. It mean unit scope name is added. So I think it is not different from David Heffernan's solution.
– Loi
Mar 31 at 10:06
Ok. So I'm left with no other suggestion other than thinking that the default set of unit scopes is different depending on the project. So the auto-filled default may need to be completed when upgrading a project from Delphi 6 to XE 10.2+. In anyway, this need to be addressed on a per-project basis.
– wesson
Apr 2 at 8:42
Ok. So I'm left with no other suggestion other than thinking that the default set of unit scopes is different depending on the project. So the auto-filled default may need to be completed when upgrading a project from Delphi 6 to XE 10.2+. In anyway, this need to be addressed on a per-project basis.
– wesson
Apr 2 at 8:42
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310592%2fhow-to-automatically-add-the-scope-name-to-the-delphi-library-unit%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why not specify the unit scope names in the project options, at least for now? This migration is complicated and you may as well concentrate on the substance first. Deal with unit scope names at the very end.
– David Heffernan
Mar 23 at 7:55
@DavidHeffernan Although I specify the unit scope name in project options, when opening a source file (created by Delphi 6), unit scope name is still not automatically added. It looks like this setting only works for source files that are created on Delphi 10.2.
– Loi
Mar 23 at 8:51
Unit scope names in project don't work that way. Read the docs again.
– David Heffernan
Mar 23 at 8:54
@DavidHeffernan You are right, can specify unit scope names in project options, although compile time will be slower than specify unit scope names in the source code.
– Loi
Mar 23 at 9:57
1
It depends on the code for compile time. It's not something that has affected me. In any case, for your migtation project it will be simpler if you keep the changes to a minimum while you migrate. Once you are happy, then consider applying source code wide changes to add unit scope names.
– David Heffernan
Mar 23 at 10:31