Jump to content

Al T

Members
  • Content Count

    94
  • Joined

  • Last visited

Posts posted by Al T


  1. So Delphi, in order for this issue to become a big deal, more people will have to report this issue:

     

    Sync status from internal system, internal issue closed on Nov 22, 2022 by Marco Cantù with comment:
    While the IDE could provide better errors in such a case, if a component in a third party project shows an AV at every compilation, it seems the issue is in the component code – it doesn't happen with other components, to our knowledge. Please check with the original author (if it's not your code) or ask for someone to check the specific code..

     

    The only way they will accept there is a Access Violation is if this happens to more than just one person and other components.

     

    With any other component, mainly copy my setups in https://en.delphipraxis.net/topic/7842-replicable-w-source-why-do-i-always-get-access-violation-every-time-i-rebuild-any-component-current-solution-is-to-restart-delphi-why/?do=findComment&comment=65699 and I'm sure you'll get a Access Violation with any other component using a single instance of the IDE.

     

    It's going to take more than one person with this issue for it to become a issue.

     

     


  2. On 11/16/2022 at 11:54 AM, Remy Lebeau said:

    The only HWND available in FMX comes from the TForm itself.  Child controls do not have their own HWNDs.  You can get the Form's HWND by using either WindowHandleToPlatform() or FormToHWND() in the FMX.Platform.Win unit.  Otherwise, if you want a child control that has an HWND, you will have to create it yourself using the Win32 API CreateWindow/Ex() API directly.

    I did find FMX.Controls.Win which isn't in the online documentation.

     

    Here is this:

     

      { TWinControl }
      /// <summary>
      ///  Wrapper for FMX.Controls.TControl for using native controls
      /// </summary>
      TWinControl = class(TControl)
      private
        FWindowProc: TWndMethod;
      private
        FParentWindow: HWND;
        FWinControls: TList;
        FDefWndProc: Pointer;
        FHandle: HWND;
        FObjectInstance: Pointer;
        function PrecedingWindow(const Control: TWinControl): HWND;
        procedure SetParentWindow(const Value: HWND);
        procedure UpdateShowing;
      protected
        /// <summary>
        ///   Return HWND handle to the component
        /// </summary>
        function GetHandle: HWND; virtual;
        /// <summary>
        ///   Set the FMX parent to the component
        /// </summary>
        procedure SetParent(const AParent: TFmxObject); reintroduce; virtual;
        /// <summary>
        ///   Return the parent
        /// </summary>
        function GetParent: TFmxObject; virtual;
        /// <summary>
        ///   WndProc procedure for this control
        /// </summary>
        procedure WndProc(var Message: TMessage); virtual;
        /// <summary>
        ///  Create native WindowHandle for control
        /// </summary>
        procedure CreateHandle; virtual;
        /// <summary>
        ///   Fill the structure using default parameters
        /// </summary>
        procedure CreateParams(var Params: TCreateParams); virtual;
        /// <summary>
        ///   Abstract method that would be call in CreateHandle method
        /// </summary>
        procedure CreateWnd; virtual; abstract;
        /// <summary>
        ///   Destroy the handle and all child handles if it exist
        /// </summary>
        procedure DestroyHandle; virtual;
        /// <summary>
        ///   Call Win API method for destroing handle from window
        /// </summary>
        procedure DestroyWindowHandle; virtual;
        /// <summary>
        ///   Return parents handle if exist. In other case return components handle
        /// </summary>
        function GetTopParentHandle: HWND;
        /// <summary>
        ///   Procedure for calling MakeObjectInstance
        /// </summary>
        procedure MainWndProc(var Message: TMessage);
        /// <summary>
        ///   Pointer to default WndProc
        /// </summary>
        property DefWndProc: Pointer read FDefWndProc write FDefWndProc;
        /// <summary>
        ///   Property for providing acceess to FHandle field
        /// </summary>
        property WindowHandle: HWND read FHandle write FHandle;
        /// <summary>
        ///   Method for sync Bounds between FMX and native control.
        /// </summary>
        procedure DoMatrixChanged(Sender: TObject); override;
        /// <summary>
        ///   Method for process of MouseActivate message
        /// </summary>
        procedure DoMouseActivate; virtual;
        /// <summary>
        ///   method for getting decision about focus setting
        /// </summary>
        procedure DoSetFocus; virtual;
      public
        constructor Create(AOwner: TComponent); overload; override;
        constructor CreateParented(ParentWindow: HWND);
        class function CreateParentedControl(ParentWindow: HWND): TWinControl;
        destructor Destroy; override;
        function HandleAllocated: Boolean;
        procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); reintroduce; virtual;
        procedure UpdateControlState;
        property Handle: HWND read GetHandle;
        property ParentWindow: HWND read FParentWindow write SetParentWindow;
        /// <summary>
        ///   Call Win API method update
        /// </summary>
        procedure Update; virtual;
        property WindowProc: TWndMethod read FWindowProc write FWindowProc;
        property Parent: TFmxObject read GetParent write SetParent;
      end;

    Would this work and if so, how do incorporate this into my FMX project?

     


  3. On 11/16/2022 at 11:54 AM, Remy Lebeau said:

    The only HWND available in FMX comes from the TForm itself.  Child controls do not have their own HWNDs.  You can get the Form's HWND by using either WindowHandleToPlatform() or FormToHWND() in the FMX.Platform.Win unit.  Otherwise, if you want a child control that has an HWND, you will have to create it yourself using the Win32 API CreateWindow/Ex() API directly.

    I'm starting to get fed up with FMX... since the VCL version works just fine..

     

    I was hoping to convert the VCL to FMX so that I can start using Skia4Delphi....

     

    I've got the component running without errors... but since I used FeditorFormClass.Create(NIL); instead of being able to use FeditorFormClass.CreateParented(HWND(parent)); ........ It just shows a blank screen with no form on it!

     

    I hate to have to figure out CreateWindowEx just so that I can create a parented FMX version 😞

     

    It looks like I've got many more days of scratching my head and beating the walls.

     

    I can only imagine a large project converting from VCL to FMX... the enormous feat that would be.

     


  4. okay.. it isn't the value or sNum...

     

    It's FScrollBars[isb]

     

    something about FScrollBars[isb] crashes it... cause I called:

     

    procedure TFormAthenaVST.UpdateEditorParameter(index:integer; dvalue: double);
    VAR isb:integer;
        sNum:single;
    begin
      WriteLog('TFormAthenaVST.UpdateEditorParameter(index:' + index.ToString + ' dvalue:' + dvalue.ToString);
      for isb:=0 to 2 do
        if index = ID_CUTOFF+isb then
          begin
            WriteLog('FScrollBars[' + isb.ToString + '].Value:=(100*value)');
            //sNum := round(100*dvalue);
            sNum := 100*dvalue;
            WriteLog('FScrollBars[isb].BeginUpdate');
            FScrollBars[isb].BeginUpdate;
            WriteLog('sNum = ' + sNum.ToString);
            FScrollBars[isb].Value:=sNum;
            WriteLog('FScrollBars[isb].EndUpdate');
            FScrollBars[isb].EndUpdate;
            WriteLog('AFTER FScrollBars[isb].Value:=sNum;');
          end;
      WriteLog('TFormAthenaVST.UpdateEditorParameter END');
    end;

    It crashes right after WriteLog('FScrollBars[isb].BeginUpdate');


  5. I'm starting to guess I need to convert Int64 to Single... opps

     

    Is there a directive I need to enable for Delphi to catch that before I compile it??

     

    --okay that isn't what I thought it was... still stumped.

     

    I'm now thinking

    procedure TFormAthenaVST.UpdateEditorParameter(index:integer;value: double);

    the value needs a rename??

     


  6. procedure TFormAthenaVST.UpdateEditorParameter(index:integer;value: double);
    VAR isb:integer;
        sNum:single;
    begin
      WriteLog('TFormAthenaVST.UpdateEditorParameter(index:' + index.ToString + ' value:' + value.ToString);
      for isb:=0 to 2 do
        if index = ID_CUTOFF+isb then
          begin
            WriteLog('FScrollBars[' + isb.ToString + '].Value:=round(100*value)');
            sNum := round(100*value);
            WriteLog('sNum = ' + sNum.ToString);
            FScrollBars[isb].Value:=sNum;
            WriteLog('AFTER FScrollBars[isb].Value:=sNum;');
          end;
      WriteLog('TFormAthenaVST.UpdateEditorParameter END');
    end;

    https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/UAthenaVSTForm.pas#L149-L164

     

    You can find all the source code here: https://github.com/War3Evo/RMSVST3/tree/Delphi-11.0/FMX_AthenaVST3

     

    WriteLog uses CodeSite Express... CakeWalk by BandLabs crashes on FScrollBars[isb].Value:=sNum;

     

    The VCL version does not crash but also uses FScrollBars[isb].Position:=round(100*value);

     

    Your help is much appreciated!

     


  7. On 11/16/2022 at 11:51 AM, Remy Lebeau said:

    That will only work for TForm handles (and alternatively, you can use FormToHWND() instead).  In FMX, only a TForm has an actual Win32 HWND assigned, its child control do not have their own HWNDs, like they do in VCL.  FMX child control are custom-drawn directly onto the TForm's window.

    How does FMX TForm know who is the child or parent of a form?


  8. The other solution found was to remove the component from https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/UAthenaVSTForm.fmx

     

    then go make changes to the project https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/PianoComponent_Install/PackageComponent_PianoKeyboard.dproj

     

    go back to project https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/Athena.dproj

     

    then now you have to put the component back on the form, align it where you want it on the form, make changes to the component, etc.  So much extra work to get the component right again and Delphi suppose to be fast and efficient programming!

     

    This major bug needs to get fixed ... it's repeatable!

     

    Any ideas or work around that doesn't require removing the component from the project that uses it?

     

    When Delphi saves... I wonder if it saves any linkage to the old code??  when you open it again... there goes the access violation?  Maybe there is a way to force Delphi to reload all components before opening project?

     


  9. 21 hours ago, Lajos Juhász said:

    Yes you can, before you compile the package uninstall all the packages that depends on that one. That should improve the situation.

     

    Unfortunately this is a "known" issue and impossible to report (as it's hard to make the required test case).

     

    PS. For a project group I even have a situation that some days Access Violation is almost every time triggered when I compile an application without runtime packages.

    It's easy to replicate.

     

    Note: I use right click to clean, right click to build, right click to install, right click to uninstall.  I double left click to select either the Windows 32 bit or Windows 64 bit platforms in the view of the Project Group.

     

    Build both Windows 32 and Windows 64 platforms and install the windows 32 bit version (Delphi won't let you install the 64 bit version) of this component: https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/PianoComponent_Install/PackageComponent_PianoKeyboard.dproj

     

    save all and close the component project

     

    open project https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/Athena.dproj

     

    then open up https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/UAthenaVSTForm.fmx

     

    You should see the piano component is there.

     

    Now ... save all and close all.

     

    Go back to the project and open https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/PianoComponent_Install/PackageComponent_PianoKeyboard.dproj

     

    uninstall the component

     

    now... make changes to line 249 by changing it from https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/PianoComponent_Install/UPianoKeyboard.pas#L249

     

    0: Canvas.Fill.Color := TAlphaColorRec.White;

     

    to

     

    0: Canvas.Fill.Color := TAlphaColorRec.Orange;

     

    after making the changes.. save all, then clean for both the windows 32 bit and windows 64 bit platforms... build both windows 32 bit and windows 64 bit platforms of the project and install this component again from https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/PianoComponent_Install/PackageComponent_PianoKeyboard.dproj

     

    save all and close this project...

     

    go back to the project and open https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/Athena.dproj

     

    now open https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/UAthenaVSTForm.fmx

     

    You'll get Access Violation every single time!  (It's repeatable)

     

    The only solution I found was to restart Delphi.

     

     

    You'll get Access Violation and the form fmx will not show up, but you'll see the source code.

     

    Proof above it's repeatable.

     

     


  10. For the replicable w/ source see

     

    This has been happening for every version of Delphi I've ever owned... it still happens in Delphi 11.0 Enterprise.  The only solution is to restart Delphi for every single change made to the component!

     

    Why do I always get Access Violation every time I rebuild a component?

     

    I've tried to uninstall / install after every build to the component...save .. open up a project that uses that component ... access violation ... solution Restart Delphi

    I've tried to just clean.. build... component...save .. open up a project that uses that component ... access violation ... solution Restart Delphi

     

    Why do I need to always restart Delphi (close delphi... then double click delphi to load it again) ... every time I rebuild a component??

     

    Is there something that I can do to stop having to Restart Delphi to fix this issue?

     

    Any ideas?


  11. [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Controls' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.ActnList' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Clipboard' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Clipboard.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.Common' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Types' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Ani' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Forms' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Header' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.TextLayout.GPU' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Canvas.GPU' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.StrokeBuilder' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.Menu.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.Logger.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.Timer.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.VirtualKeyboard.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Pickers' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Pickers.Default' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Calendar' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Calendar.Style' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.ExtCtrls' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.DateTimeCtrls' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.DateTimeCtrls.Types' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.ListBox' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.ListBox.Selection' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.Metrics.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.Device.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.SaveState.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Platform.Screen.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.AcceleratorKey.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.KeyMapping' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.WebBrowser' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.WebBrowser.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Controls.Ole' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.MultiTouch.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.MultiTouch' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Gestures.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Gestures' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Forms.Border.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Forms.Border' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Context.DX11' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Context.DX9' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Canvas.D2D' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Dialogs.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.DialogHelper' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Dialogs.Default' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Edit' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Edit.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Edit.Style' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.SpellChecker' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.MagnifierGlass' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Layouts' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Effects' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Filter.Custom' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Filter' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.InertialMovement' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.StdCtrls' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Switch.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Switch.Style' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Styles.Switch' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Styles.Objects' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Controls.Presentation' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Presentation.Win.Style' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Presentation.Style.Common' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Presentation.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Controls.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Styles' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Presentation.Style' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Presentation.Factory' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Controls.Model' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Presentation.Messages' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.StdActns' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.VirtualKeyboard' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Printer' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Printer.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Canvas.GDIP' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.ZOrder.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.ZOrder' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Canvas.GPU.Helpers' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Materials.Canvas' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Types3D' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Materials' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Menus' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.DialogService' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Objects' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.AcceleratorKey' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.FontGlyphs' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.FontGlyphs.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Helpers.Win' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.ImgList' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.MultiResBitmap' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Dialogs' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.DialogService.Sync' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.BehaviorManager' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Graphics' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.TextLayout' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Text' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Utils' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Surfaces' implicitly imported into package 'PackageComponent_PianoKeyboard'
    [dcc64 Warning] PackageComponent_PianoKeyboard.dpk(38): W1033 Unit 'FMX.Consts' implicitly imported into package 'PackageComponent_PianoKeyboard'

     

    I've read these articles, but still can't understand what to do with all of those above... I've tried adding them to my uses clause, but that doesn't reduce their numbers.

     

    https://stackoverflow.com/questions/1215664/is-implicitly-imported-always-a-bad-thing-in-delphi-packages

    https://rvelthuis.blogspot.com/2017/08/implicitly-imported-units-in-package.html

     

    I think I might have to add something to requires... but I don't know how to search for what I need to add anything to requires.

     

    Here's the open source link to the FMX component that I translated from VCL: https://github.com/War3Evo/RMSVST3/tree/Delphi-11.0/FMX_AthenaVST3/PianoComponent_Install

     

    Thank you for any help in advance!


  12. 19 hours ago, Pat Foley said:
    
    
    class? function TVST3Controller.GetEditorClass:TForm;?
    begin
      result:=NIL;
    end;
    
    function TVST3Controller.CreateForm(aParent: TForm):TForm;  //pass 
    VAR FeditorForm:TclassedForm;//
    ..
      else result:=FeditorFormClass.CreateParented(aParent);//HWND(parent));  // HWND not in FMX 

    FMX doesn't use windows handles AFAIK.   It's useful to know that FMX does not have a TWinControl. 

    Not liking that these are not class methods. 

    Pat     

     

     

    The only problem is that this is a Plugin for a Windows DAW that would be passing the handle of the Window or View.   I need to be able to handle HWND.

     

    It will also support Mac and Linux DAWs.


  13. I'm trying to convert VCL to FMX...

     

    https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/AthenaVST3/VST3SDK/UVST3Controller.pas#L304-L311

     

    function TVST3Controller.CreateForm(parent:pointer):TForm;
    VAR FeditorFormClass:TFormClass;
    begin
      FeditorFormClass:=GetEditorClass;
      if FeditorFormClass = NIL then FeditorFormClass:=GetPluginInfo.PluginDef.ecl;
      if FeditorFormClass = NIL then result:=NIL
      else result:=FeditorFormClass.CreateParented(HWND(parent));
    end;

     

     

    Is there a way to do this in FMX?

     

    Thanks in advance!

×