Jump to content

David Hoyle

Members
  • Content Count

    122
  • Joined

  • Last visited

  • Days Won

    1

David Hoyle last won the day on February 5 2019

David Hoyle had the most liked content!

Community Reputation

46 Excellent

1 Follower

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @limelect Yes, BPLs can see to be easier to work with but bear in mind that if you code something wrong you can make the IDE you are working in unstable. I always use a secondary IDE using a -rNewRegKey command line and then I can kill of that session if I do something wrong.
  2. Her e's my code from last night. Add Comp To Form.zip
  3. I don't have any experience with FMX but I suspect we need to understand whether the currently selected control can take other child controls. Unfortunately I don't have the time today to have a look at this but I will look into this.
  4. @Remy Lebeau you were right, I just didn't call it properly. The below code works for me in 10.4.1... // Set the control framework ActivateClassGroup(Vcl.Controls.TControl); // <= THIS FIXES IT!!!!!!!!! // Get the generic form editor for the current module Module := TACTFUtilities.CurrentModule; FormEditor := TACTFUtilities.FormEditor(Module); // Get the simple class name from a dropdown, i.e. TLabel, TButton, TEdit, etc strClassName := edtComponentClassName.Text; Delete(strClassName, Pos('=', strClassName), strClassName.Length); // Insert the component with the selected component parent If Assigned(FormEditor) Then Begin Component := FormEditor.GetCreateParent; Component := FormEditor.CreateComponent( Component, strClassName, 10, 10, 50, 28 ); FormEditor.MarkModified; End;
  5. Alas @Remy Lebeau's suggestion has not worked in the 2 scenarios I have. I will pick this up again later today or tomorrow as I'm sure I had some part of it working with qualified names last week.
  6. Thanks @Remy Lebeau, I will check this out today.
  7. @limelect I mean Unit.Component or perhaps event Package.Unit.Component. At some point in the work I did last Saturday when trying to find a solution for you, I'm positive one of the solutions accepted this format as a string. I'll try again tomorrow.
  8. I need to go back over this at the weekend (no time at the moment due to the day job) but I seem to remember one of the techniques I tried required a fully qualified name which I think we can build from enumerating the packages and their components in the IDE.
  9. David Hoyle

    TWebBrowser Question

    What happens to the behaviour if you set the current location of your application (SetCurrentDir).
  10. Well I think GetClass() is finding FMX controls not VCL ones which is why this is not working (despite the designer type and framework type being VCL). Had enough for now. Might look later in the week if time permits.
  11. Okay, I'm leaning towards the issue being FMX verse VCL. I iterated all the packages below and picked out all the components and found duplicates between the frameworks. So I think GetClass() is looking up in FMX instead of VCL. Since it's now failing, selecting a VCL only component does nothing as GetClass() cannot find the component (which does not exist in FMX). Getting a bit late now but I know that on occasions the IDE prompts you to select which framework you are using (FMX or VCL) and I need to find out how we influence this determination (starting a new VCL app didn't work but then again I didn't save it).
  12. @limelect Just checked that error I was getting has nothing to do with the plug-in, the IDE does it all on its own without the plug-in being invoked but guess what, the exact same code in another session fails.
  13. @limelect Just had a thought and tried the following and had some success... but need to go get something to eat... You must use a Package and that package must be set to Design Time only. Doing that I've managed to insert a TLabel and TEdit successfully but the add-in crashed exiting the IDE, something to do with the form I was using... need food thought 🙂
  14. David Hoyle

    Grep search empty window with 10.4.1

    Does this functionality use any environment variable from the IDE? I reported this issue yesterday: https://quality.embarcadero.com/browse/RSP-30832. I wonder if it's related and the issue is more systemic.
  15. David Hoyle

    GExperts for Delphi 10.4.1

    It seems there has been a change in the dockable forms inside the IDE between 10.4.0 and 10.4.1. I've had to recompile the 2 plug-ins of mine with dockable forms to stop them AV the IDE when desktops are loaded and saved or dockable forms are displayed undocked. I've added information to https://quality.embarcadero.com/browse/RSP-30777.
×