Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Need hints getting started with D10


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Dec 30, 2015 11:18 AM Last Post By: John Herbster
John Herbster

Posts: 10
Registered: 12/1/99
Need hints getting started with D10  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 26, 2015 5:53 PM
I am coming from D7 on XP to D10 on WIn10, so my problems are likely not bugs.

When trying to create a template for a visual component event handler by double-clicking on the event blank in the object inspector, I get the error message.
"Could not find source location to add method ..."
When trying to navigate to the event handler by double-clicking on the event in the object inspector, I get the error message.
"Cannot find implementation of method"
What's my problem?

When I try to skip between the header for a method in the interface section and the implementation of the same in the implementation, I used to be able to do it by pressing control-shift-T or something like that in D7; but this does nothing in D10.
What's my problem?

Sometimes when from the D10 IDE, I try to close and save project, I get:
"Failed to save project "<path>.dproj".
"The following error occurred while saving:
"Unable to rename '<path>.dproj.$$$' to '<path>.dproj.local'
"Ignore this error and continue? If you chose "YES", your changes to this project may be lost
where <path> is the folder and name of my project like "C:\Users\John\...\T_PWD_RaceDataDisplay_E"
Note that this $$$ file is in my project directory and not any __history or __recovery folders.
If I manually delete the <path>.dproj.$$$ from the project directory, then I can proceed to close project with changes saved.
I suspect that the "$$$" and "local" filename suffixes may have something to do with version control, which I have never touched since installing this IDE.
What' my problem?

On the good side, most of my old code runs perfectly - even reading and saving data in usable places and only messing up forms a little.

Thanks, guys for any help! --JohnH

PS: what do you call Delphi 10 around here? DX, D10, D10 Seattle, or what?
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: Need hints getting started with D10
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 27, 2015 1:10 AM   in response to: John Herbster in response to: John Herbster
John Herbster wrote:

I am coming from D7 on XP to D10 on WIn10, so my problems are likely
not bugs.

When trying to create a template for a visual component event handler
by double-clicking on the event blank in the object inspector, I get
the error message. "Could not find source location to add method
..." When trying to navigate to the event handler by double-clicking
on the event in the object inspector, I get the error message.
"Cannot find implementation of method" What's my problem?

Does the project compile without errors at this point? This sounds as
if the IDE cannot find the form class declaration in the unit for some
reason.


When I try to skip between the header for a method in the interface
section and the implementation of the same in the implementation, I
used to be able to do it by pressing control-shift-T or something
like that in D7; but this does nothing in D10. What's my problem?

It is probably releated to the one above, the IDE cannot parse the unit
correctly since it runs into an error in one of the units cited in the
Uses clause.


Sometimes when from the D10 IDE, I try to close and save project, I
get: "Failed to save project "<path>.dproj".
"The following error occurred while saving:
"Unable to rename '<path>.dproj.$$$' to '<path>.dproj.local'
"Ignore this error and continue? If you chose "YES", your changes
to this project may be lost where <path> is the folder and name of my
project like "C:\Users\John\...\T_PWD_RaceDataDisplay_E" Note that
this $$$ file is in my project directory and not any __history or
__recovery folders.

Are you running the IDE under an admin account? If not this is likely a
folder permission thing. If you have set up a new machine with Win10
and then just copied the project folder from another machine or backup
medium the permissions on the files and folders in the copied branch
may not quite be what they should be. I ran into this myself (with
another program's files, not a Delphi project) when I copied a folder
from an external USB drive to the local disk. I had to log in as admin
and explitely grant full access to my normal account for this folder
and the files in it to fix this problem.

If I manually delete the <path>.dproj.$$$ from
the project directory, then I can proceed to close project with
changes saved. I suspect that the "$$$" and "local" filename
suffixes may have something to do with version control, which I have
never touched since installing this IDE. What' my problem?

This has nothing to do with version control per se, it is part of a
kind of local backup for the project file as far as I know, done to
make sure the dproj file is not lost when an error occurs while the IDe
tries to save it.


--
Peter Below
TeamB

John Herbster

Posts: 10
Registered: 12/1/99
Re: Need hints getting started with D10  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 27, 2015 12:58 PM   in response to: Peter Below in response to: Peter Below
Thanks, Peter for your reply. I will reply again after I have run so tests.

Peter Below wrote:

John Herbster wrote:

When trying to create a template for a visual component event handler
by double-clicking on the event blank in the object inspector, I get
the error message. "Could not find source location to add method
..." When trying to navigate to the event handler by double-clicking
on the event in the object inspector, I get the error message.
"Cannot find implementation of method" What's my problem?

Does the project compile without errors at this point? This sounds as
if the IDE cannot find the form class declaration in the unit for some
reason.

Yes, It compiles and runs w/o error.

When I try to skip between the header for a method in the interface
section and the implementation of the same in the implementation, I
used to be able to do it by pressing control-shift-T or something
like that in D7; but this does nothing in D10. What's my problem?

It is probably related to the one above, the IDE cannot parse the unit
correctly since it runs into an error in one of the units cited in the
Uses clause.

I will check that on a minimal project.

Sometimes when from the D10 IDE, I try to close and save project, I
get: "Failed to save project "<path>.dproj".
"The following error occurred while saving:
"Unable to rename '<path>.dproj.$$$' to '<path>.dproj.local'
"Ignore this error and continue? If you chose "YES", your changes
to this project may be lost where <path> is the folder and name of my
project like "C:\Users\John\...\T_PWD_RaceDataDisplay_E" Note that
this $$$ file is in my project directory and not any __history or
__recovery folders.

Are you running the IDE under an admin account? If not this is likely a
folder permission thing. If you have set up a new machine with Win10
and then just copied the project folder from another machine or backup
medium the permissions on the files and folders in the copied branch
may not quite be what they should be. I ran into this myself (with
another program's files, not a Delphi project) when I copied a folder
from an external USB drive to the local disk. I had to log in as admin
and explicitly grant full access to my normal account for this folder
and the files in it to fix this problem.

I am running from an account with admin privileges, but not the "Admin" account

If I manually delete the <path>.dproj.$$$ from
the project directory, then I can proceed to close project with
changes saved. I suspect that the "$$$" and "local" filename
suffixes may have something to do with version control, which I have
never touched since installing this IDE. What' my problem?

This has nothing to do with version control per se, it is part of a
kind of local backup for the project file as far as I know, done to
make sure the dproj file is not lost when an error occurs while the IDe
tries to save it.

-- Peter Below, TeamB
John Herbster

Posts: 10
Registered: 12/1/99
Re: Need hints getting started with D10  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 29, 2015 4:49 PM   in response to: Peter Below in response to: Peter Below
Peter Below wrote:
John Herbster wrote:

I am coming from D7 on XP to D10 on WIn10, so my problems are likely
not bugs.

When trying to create a template for a visual component event handler
by double-clicking on the event blank in the object inspector, I get
the error message. "Could not find source location to add method
..." When trying to navigate to the event handler by double-clicking
on the event in the object inspector, I get the error message.
"Cannot find implementation of method" What's my problem?

Does the project compile without errors at this point? This sounds as
if the IDE cannot find the form class declaration in the unit for some
reason.

Peter, Thanks for the hints.

I found the larger part of the problem and I would call it a bug.
To reproduce it, create a new VCL project with one button and add
the following code for the tObjectA and tObjectAB classes in the
interface section immediately after the TForm declaration:

  tObjectA = class
    private
      fA: integer;
    public
    end;
 
  tObjectAB = class (tObjectA)
    fB: integer;  // <== Good!
//  fB: integer   // <== Bad! Note missing semicolon!
  end;


Without that semicolon, the IDE is really screwed up
and creates erroneous error messages.

Is this worth posting in the new Quality Central?

--JohnH

PS: Here is all of the code:
unit T_Project_H_Form1;
 
interface
 
uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
  Vcl.StdCtrls;
 
type
  TForm6 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
 
  tObjectA = class
    private
      fA: integer;
    public
    end;
 
  tObjectAB = class (tObjectA)
    fB: integer;  // <== Good!
//  fB: integer   // <== Bad! Note missing semicolon!
  end;
 
var
  Form6: TForm6;
 
implementation
 
{$R *.dfm}
 
procedure TForm6.Button1Click(Sender: TObject);
begin
//  SendMesage('Button1Click');
end;
 
end.
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: Need hints getting started with D10  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 29, 2015 11:18 PM   in response to: John Herbster in response to: John Herbster
John Herbster wrote:

Does the project compile without errors at this point? This sounds
as if the IDE cannot find the form class declaration in the unit
for some reason.

Peter, Thanks for the hints.

I found the larger part of the problem and I would call it a bug.
To reproduce it, create a new VCL project with one button and add
the following code for the tObjectA and tObjectAB classes in the
interface section immediately after the TForm declaration:

  tObjectA = class
    private
      fA: integer;
    public
    end;
 
  tObjectAB = class (tObjectA)
    fB: integer;  // <== Good!
//  fB: integer   // <== Bad! Note missing semicolon!
  end;


Without that semicolon, the IDE is really screwed up
and creates erroneous error messages.

Is this worth posting in the new Quality Central?

It is definitely a bug so should be reported.

--
Peter Below
TeamB

John Herbster

Posts: 10
Registered: 12/1/99
Re: Need hints getting started with D10  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2015 11:14 AM   in response to: Peter Below in response to: Peter Below
It is definitely a bug so should be reported.
Peter Below, TeamB

Peter, I reported it in
https://quality.embarcadero.com/browse/RSP-13301
Thank you for your help. --JohnH
John Herbster

Posts: 10
Registered: 12/1/99
Re: Need hints getting started with D10  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2015 11:18 AM   in response to: John Herbster in response to: John Herbster
A missing semicolon did not affect the compilation, but did affect the IDE's scanning to find the implementations of methods.

I noted it here: https://quality.embarcadero.com/browse/RSP-13301
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02