Jump to content

Ian Branch

Members
  • Content Count

    1274
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Ian Branch


  1. Hi Guys,

    Is there any kind of master/reference list around that details what has changed between Delphi versions?

    I am looking at an older library and the compile messages are saying things like..

    [dcc32 Warning] xxxxx.pas: W1000 Symbol 'TImageIndex' is deprecated: 'Use System.UITypes.TImageIndex'

    and

    [dcc32 Warning] xxxxx.pas: W1000 Symbol 'TScrollStyle' is deprecated: 'Use System.UITypes.TScrollStyle'

    and

    [dcc32 Warning] xxxxx.pas: W1000 Symbol 'ThemeServices' is deprecated: 'Use StyleServices'

    amongst others.

    when were they introduced?

    I have come across this issue many other times when working older code.

     

    Regards & TIA,

    Ian


  2. Hi Team,

    I have a small App that lets users call other Apps using the following borrowed code example for MyApp1 & 2...

    procedure TMainForm.btnMyApp1Click(Sender: TObject);
    var
      SEInfo: TShellExecuteInfo;
      ExitCode: DWORD;
      ExecuteFile: string;
    begin
      lMyApp1Open := True;
      Cursor := crHourGlass;
      btnMyApp1.Color := clLime; // Standard is clBtnFace
      ExecuteFile := sAppsFilePath + '\MyApp1.exe';
      FillChar(SEInfo, SizeOf(SEInfo), 0);
      SEInfo.cbSize := SizeOf(TShellExecuteInfo);
      with SEInfo do
      begin
        fMask := SEE_MASK_NOCLOSEPROCESS;
        Wnd := Application.Handle;
        lpFile := PChar(ExecuteFile);
        nShow := SW_SHOWNORMAL;
      end;
      Cursor := crDefault;
      if ShellExecuteEx(@SEInfo) then
      begin
        repeat
          Application.ProcessMessages;
          GetExitCodeProcess(SEInfo.hProcess, ExitCode);
        until (ExitCode <> STILL_ACTIVE) or Application.Terminated;
      end
      else
        ShowMessage('Error starting MyApp1!');
      btnMyApp1.Color := clBtnFace; // Standard is clBtnFace
      lMyApp1Open := False;
    end;
    //
    procedure TMainForm.btnMyApp2Click(Sender: TObject);
    var
      SEInfo: TShellExecuteInfo;
      ExitCode: DWORD;
      ExecuteFile: string;
    begin
      lMyApp2Open := True;
      Cursor := crHourGlass;
      btnMyApp2.Color := clLime; // Standard is clBtnFace
      ExecuteFile := sAppsFilePath + '\MyApp2.exe';
      FillChar(SEInfo, SizeOf(SEInfo), 0);
      SEInfo.cbSize := SizeOf(TShellExecuteInfo);
      with SEInfo do
      begin
        fMask := SEE_MASK_NOCLOSEPROCESS;
        Wnd := Application.Handle;
        lpFile := PChar(ExecuteFile);
        nShow := SW_SHOWNORMAL;
      end;
      Cursor := crDefault;
      if ShellExecuteEx(@SEInfo) then
      begin
        repeat
          Application.ProcessMessages;
          GetExitCodeProcess(SEInfo.hProcess, ExitCode);
        until (ExitCode <> STILL_ACTIVE) or Application.Terminated;
      end
      else
        ShowMessage('Error starting MyApp2!');
      btnMyApp2.Color := clBtnFace; // Standard is clBtnFace
      lMyApp2Open := False;
    end;

    The issue is that if both MyApp1 & MyApp2 apps are called and MyApp1 closes, it does actually close, it appears to stay open in my front end app, the buttons stay colored, until MyApp2 closes.  Then both buttons return to normal color.

    This is an area I have no knowledge of.

    Can someone advise/suggest what is not happening and how it can be corrected please?  Be greatly appreciated.

    Regards & TIA,

    Ian

     


  3. So, the thicken plots....

    I found that most of the source files in the project were in fact ok and all the procedures/functions/events were showing.

    Hmmm, what was different in the two that they weren't?

    Only two functions were showing.

    In my GenKey function, the second in the source, I had the following line..

    {code}

      for var i: Integer := 1 to 7 do

    ...

    ...

    {code}

    With the attendant underlining of 'var' and ':='.  See screen shot 4 attached.

    Hmmmmm.  I wonder????

    So I declared i and changed the code to the conventional "for i := 1 to 7 do"

    BINGO!!!  I now get all the procedures/functions/events showing.  See screen shot 5 attached.

    Reverse the change and the issue returns.  Reverse it again and all good.

    I think I found a Bug!!!

    Can someone replicate this and verify please...

    I'm going to have a look at the other file now.

    Regards,

    Ian

     

    Update:  Same issue with the same inline code in the second file.

     

    Screenshot_4.png

    Screenshot_5.png

     

     

     


  4. Hi Team,

    D10.3.1.

    It is a long time since I had a 'clean' Delphi edit window.

    My PC did a Windows update, 1809, and all hell broke loose.  Had to reinstall Delphi from scratch. 😞

    Anyway I install all the usual add-ons, Gexperts, cnPack, DDevExtensions, etc.  Added all the required 3rd party stuff.  All good.

    I was busy editing away when I noticed that the IDE Navigation Bar would only show those Functions/Procedures I had added to the app source, none of the ones for normal events.  See attached screen shot 2.

    cnPack was displaying all of them.  See screen shot 3.

    Is this something wrong or normal?

    If the Delphi Nav Bar should be showing all of them, is there a 'switch' somewhere?

    I did disable/enable the Nav Bar to no effect.

    It only seems to affect those projects that were originally created in D10.2.3 or earlier.  Anything created in 10.3.0 or later is fine.

    Thoughts/suggestions?

    Regards & TIA,

    Ian

    Screenshot_2.png

    Screenshot_3.png


  5. Hi ByteJuggler,

    I couldn't find anything.  I deleted the original .dproj files and rebuilt them from the .dpr but no good.

    Something deep in there.

    I rebuilt the App from scratch cross copying the components and code.

    All good now.

    Thanks for your thoughts.

    Regards,

    Ian


  6. Hi Team,

    I am updating an old project ex D2007, to Rio.

    Have it all working fine.

    I went to select a style, 'Iceberg Classico' which was selected and built OK.

    When I run the App in either the IDE or stand alone it tells me "Style 'Iceberg Classico' not found.".

    What could be stopping it please.  The Style is fine on my newer projects.

    Regards & TIA,

    Ian


  7. Hi Team,

    Not sure if this is the right place for this query.  Somebody correct me please if its not.

    Installed OnGuard into D10.3.1.  All good.

    Now building all the Demos/Examples to make sure everything is as it should be.

    Most of them there is no issue however on 3 of them I have the same issue.

    I will use the EXInst example for this query.

    When I tried to build the example I got the message it couldn't find the IsFirstInstance function.

    Snooping, I found that ogFirst is now vcl.ogfirst, so I changed the uses to vcl.ogfirst.

    Hmmm  Same error. 😞  vcl.ogfirst is definately there.  The following is the code in exinst..

    program Exinst;
    
    uses
      Forms,
      vcl.ogfirst,
      ExInstU in 'EXINSTU.PAS' {FirstInstFrm};
    
    
    begin
      Application.Title := 'Single Instance Example';
    
      if IsFirstInstance then begin
        Application.CreateForm(TFirstInstFrm, FirstInstFrm);
        Application.Run;
      end else
        ActivateFirstInstance;
    end.
    

    In vcl.ogfirst there is the following..

    ...
    
    ...
    
    {detect/Activate instance routines}
    type
      TogFirst = record
      private class var
        FFirstInstance : Boolean;
        FInstanceMutex : THandle;
      private
        class function GetMutexName: string; static;
      public
        class function IsFirstInstance: Boolean; static;
        class procedure ActivateFirstInstance; static;
      end;
    
    ...
    
    ...
    

    What have I missed please?

     

    Regards & TIA,

    Ian

     

     


  8. Hi FredS,

    Excellent.  Thank you.

    So, is the idea to get the IDE to use fastdcc32 in lieu of dcc32, or is it purely for manual calling?

    If it is intended for the IDE to call, where/how is this achieved?

    Regards,

    Ian


  9. Please pardon my ignorance here but I haven't 'deployed' fastdcc before.

    hat is the process to deploy pls?  Do I simply run fastdcc32.exe in the file and like idefixpack it will extract and install itself, and I presume fastdcc32hok.dllx,  in the appropriate place?  I only install the 32bit stuff.

    How do I check/confirm it is installed correctly?

    Regards & TIA,

    Ian

×