Jump to content

David Hoyle

Members
  • Content Count

    184
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by David Hoyle

  1. David Hoyle

    IComparer Interface not being released

    Thank's Stefan. Originally I had the following... System.Generics.Collections.TArray.Sort<TXTColumnPosition>(Result, TXTColumnPositionComparer.Create); and that would release. I changed it while trying to find out why. I'll change it as you suggest (I should have noticed that) and see if it works.
  2. David Hoyle

    IComparer Interface not being released

    Ignore me, should have checked QP first: https://quality.embarcadero.com/browse/RSP-15797.
  3. If dragging and dropping in the structures pain does not work I would view the form as text Alt+F12 in my keybindings and move the items in the DFM. If you are not familiar with the DFM format please backup the file first.
  4. David Hoyle

    Resolve a uses clause unit path?

    @Dave Nottage see my response above, I was having a very dense day yesterday.
  5. David Hoyle

    Resolve a uses clause unit path?

    Couldn't see the wood for the trees yesterday... If Supports(Project.ProjectOptions, IOTAProjectOptionsConfigurations, POC) Then Begin strSearchPath := POC.ActiveConfiguration.Value[sUnitSearchPath]; ... End; That's been bugging me all day (pun intended) 🙂
  6. David Hoyle

    Resolve a uses clause unit path?

    No flame was inferred 😀. The point I was trying to make was that Dave suggested using iOTABuildConfiguration with constants. This would not work for me.
  7. David Hoyle

    Resolve a uses clause unit path?

    @Uwe Raabe No I wasn't 😞 Can't remember when environment variables were introduced but I see that start life in XE3. I would have to test whether this works for all environment variables, i.e. %AppData% etc.
  8. David Hoyle

    Resolve a uses clause unit path?

    Actually I disagree, sorry. The IOTABuildConfiguration should be the new way to do thing as its takes account of the various configurations you might want (Debug / Release being the basics). I used IOTAProjectOptions which is the old pre-XE2 IDE style where there was only one option but it does seem to return the active configuration which is what I wanted. I got 4 values out of the active IOTABuildConfiguration but loads of stuff out of the IOTAProjectOptions and I could use any of the constants in DCCStrs or CommonOptionsStrs. BTW: I'm using 10.2.3. I have yet to test this on previous compilers / IDEs.
  9. David Hoyle

    Resolve a uses clause unit path?

    I know I'm a week behind in this conversation but unfortunately the code @Dave Nottage referred to does not work. I've had to do something similar today for an old OTA plug-in in which I never checked for CodeSiteLogging being on the library path. The below code is what I've eventually had to do (`IOTAProjectOptionsConfiguration` would not return any useful information on the project). Class Procedure TDDTOpenToolsAPIFunctions.CheckLibraryPath; ResourceString strCodeSiteLoggingNotFound = '"CodeSiteLogging" not found in your library paths!'; Const strProjectSrcDir = 'SrcDir'; strDCCLibraryPath = 'LibraryPath'; strCodeSiteLoggingDcu = 'CodeSiteLogging.dcu'; Var slSearchLibrary: TStringList; PO: IOTAProjectOptions; S : IOTAServices; BDSMacros: TRegEx; M: TMatch; slMacros: TStringList; iMacro: Integer; Begin slSearchLibrary := TStringList.Create; Try If Supports(ActiveProject.ProjectOptions, IOTAProjectOptions, PO) Then slSearchLibrary.Add(StringReplace(VarToStr(PO.Values[strProjectSrcDir]), ';', #13#10, [rfReplaceAll])); If Supports(BorlandIDEServices, IOTAServices, S) Then slSearchLibrary.Add(StringReplace(VarToStr(S.GetEnvironmentOptions.Values[strDCCLibraryPath]), ';', #13#10, [rfReplaceAll])); slMacros := TStringList.Create; Try BDSMacros := TRegEx.Create('\$\((\w+)\)', [roIgnoreCase, roMultiLine, roCompiled]); For M In BDSMacros.Matches(slSearchLibrary.Text) Do Begin If slMacros.IndexOfName(M.Groups.Item[1].Value) = -1 Then slMacros.AddPair(M.Groups.Item[1].Value, StringReplace( GetEnvironmentVariable(M.Groups.Item[1].Value), '\', '\\', [rfReplaceAll])); End; For iMacro := 0 To slMacros.Count - 1 Do Begin BDSMacros := TRegEx.Create('\$\(' + slMacros.Names[iMacro] + '\)', [roIgnoreCase, roMultiLine, roCompiled]); slSearchLibrary.Text := BDSMacros.Replace(slSearchLibrary.Text, slMacros.ValueFromIndex[iMacro]); End; Finally slMacros.Free; End; If FileSearch(strCodeSiteLoggingDcu, StringReplace(slSearchLibrary.Text, #13#10, ';', [rfReplaceAll])).Length = 0 Then OutputMsg(strCodeSiteLoggingNotFound); Finally slSearchLibrary.Free; End; End;
  10. Having written a few highlights for the IDE for other scripts I know it could in essence be done however the highlighter would need to know more about what it is parsing than just the line of code it currently expects, i.e. what IFDEFs are in play. For those defined in the Project Options not so bad but for those that may be define in code it's more difficult as the highlighter would have to pre-parse the code. This would be a performance issue if not handled in a background thread, i.e. parse some code (assuming the current module only not the project and place a list of active defines in the wizard that the highlighter can use). One other thing would be that the list of colours / fonts the IDE uses is fixed so the colour for the disabled IFDEF section would have to be configurable by the wizard interface. I'll caveat all of the above with - this is just theory
  11. I'm not aware of one. The first thought is a al CnPack and Parnassum and hack the editor and draw of the top of it but on reflection there may be an easier way, you could write an enhanced highlighter for the IDE and use that instead of the built in one.
  12. David Hoyle

    ANN: Documentation Insight Hotfix for Delphi 10.3.2

    Old tired eyes I forked out for 2 last year instead of a new laptop (had to fork out for that 2 months ago when the old one died). I makes a huge difference to the experience of coding.
  13. Thomas, Unfortunately, it would seem something has changed in RAD Studio which is now crashing GExperts. The following appear when you shutdown the IDE (whether its immediately after opening or after a time of working). I know its GExperts as I've removed all experts and added them back one at a time until the last one to be added was GExperts (as I suspected it might be - only because its likely to be one of the few experts that will work outside of the OTA). I've tried to get more information by changing EurekaLog's IDE settings to capture all errors but it would seem they are happening after the EL BPL had unloaded. If you need more information, please ask and I'll debug the IDE with the IDE (although I don't have the GExperts source).
  14. David Hoyle

    GExperts 1.3.13.77 Crashes RAD Studio 10.3.2 on Shutdown

    I'm well confused now! Below are the Experts being loaded. If GExperts is the last then I get the call stack exceptions also below (from a second clean instance of the IDE) but if I load GExperts earlier in the process (as per the list below) NO crash from the IDE 😕 Note: MMX is not enabled as this was added after I reported the issues yesterday so it disabled to ensure its not MMX. Looks like EurekaLog has a hanging notifier (I'll send this to them for them to have a look at this) and the Parnassus Core Editor has a handing reference. So @dummzeuch you don't need to do anything at the moment but I'm still perplexed that I had a stable IDE and then adding GExpert in suddenly causes the crashes. Exception 1 :208e1367 ; C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\coreide260.bpl :237c2f2b EurekaLogExpert260.@Ecommon@GetCurrentProject$qqrx20System@UnicodeString + 0xc3 :237c1fdf ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :2380b27f ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :2380b46b ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :208e6228 ; C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\coreide260.bpl :208e68db coreide260.@Ideservices@FileNotification$qqr29Toolsapi@TOTAFileNotificationx20System@UnicodeString + 0x17 :0d84d850 Exception 2 :208e1367 ; C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\coreide260.bpl :237c2f2b EurekaLogExpert260.@Ecommon@GetCurrentProject$qqrx20System@UnicodeString + 0xc3 :237c1fdf ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :2380b29c ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :2380b46b ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :208e6228 ; C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\coreide260.bpl :208e68db coreide260.@Ideservices@FileNotification$qqr29Toolsapi@TOTAFileNotificationx20System@UnicodeString + 0x17 :0d84d850 Exception 3 :208e1367 ; C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\coreide260.bpl :237c2f2b EurekaLogExpert260.@Ecommon@GetCurrentProject$qqrx20System@UnicodeString + 0xc3 :237c1fdf ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :2380b27f ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :2380b46b ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :208e6228 ; C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\coreide260.bpl :208e68db coreide260.@Ideservices@FileNotification$qqr29Toolsapi@TOTAFileNotificationx20System@UnicodeString + 0x17 :0d84d850 Exception 4 :208e1367 ; C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\coreide260.bpl :237c2f2b EurekaLogExpert260.@Ecommon@GetCurrentProject$qqrx20System@UnicodeString + 0xc3 :237c1fdf ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :2380b29c ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :2380b46b ; D:\Documents\RAD Studio\Binaries\EurekaLog 7\Packages\Studio26\EurekaLogExpert260.bpl :208e6228 ; C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\coreide260.bpl :208e68db coreide260.@Ideservices@FileNotification$qqr29Toolsapi@TOTAFileNotificationx20System@UnicodeString + 0x17 :0d84d850 Exception 5 RTL.System._IntfClear(???) :500679a8 @IntfClear + $10 :125d2813 ; D:\OneDrive\Documents\Embarcadero\Studio\20.0\CatalogRepository\ParnassusCoreEditor-1.0\ParnassusCoreEditor.dll :125f2c90 ; D:\OneDrive\Documents\Embarcadero\Studio\20.0\CatalogRepository\ParnassusCoreEditor-1.0\ParnassusCoreEditor.dll RTL.System._IntfClear(???) :500679ab @IntfClear + $13 RTL.System.TInterfacedObject._Release RTL.System._IntfClear(???) :500679ab @IntfClear + $13 RTL.System.TObject.Free RTL.System.SysUtils.FreeAndNil(???) :5005f8eb TObject.Free + $B RTL.System._Halt0 :50061935 @Halt0 + $B1 :775f0466 ntdll.RtlFreeUserStack + 0xb6 :775bd40c ntdll.RtlGetNtSystemRoot + 0x6c :775cb044 ntdll.LdrShutdownProcess + 0xf4 :775deed5 ntdll.RtlExitUserProcess + 0xb5 :75364f33 KERNEL32.ExitProcess + 0x13 RTL.System._Halt0 :5006199a @Halt0 + $116 :75360419 KERNEL32.BaseThreadInitThunk + 0x19 :775e662d ntdll.RtlGetAppContainerNamedObjectPath + 0xed :775e65fd ntdll.RtlGetAppContainerNamedObjectPath + 0xbd
  15. David Hoyle

    GExperts and Delphi 10.3.2

    @dummzeuchIt might be something to do with most if not all the Embarcadero servers not working properly and 10.3.2 cannot authenticate you current license.
  16. David Hoyle

    GExperts 1.3.13.77 Crashes RAD Studio 10.3.2 on Shutdown

    @timfrost I'll investigate removing other packages (some my own other not) until GExperts stops crashing. I'll even try debugging the crash to see what is causing it.
  17. David Hoyle

    Delphi 10.3 Update 2 available

    Which brings us back to another conversation... I will not comment on
  18. David Hoyle

    Delphi 10.3 Update 2 available

    @Markus KinzlerSometimes a refresh doesn't work and you need to remove and re-add the license to get the updated permissions.
  19. David Hoyle

    ANN: Documentation Insight Hotfix for Delphi 10.3.2

    Slight problem with the about dialogue (on a large screen 2560 x 1440 @ 100% scaling)... i.e. I can't read it 😞
  20. David Hoyle

    GExperts 1.3.13.77 Crashes RAD Studio 10.3.2 on Shutdown

    Thomas, I originally has 1.3.12.76 but before reporting the issue updated to 1.3.13.77 from your website (so the installer version not my own).
  21. David Hoyle

    keyboard shortcut for activating the code editor

    @dummzeuch I don't think there is as I implemented a shortcut of my own in Browse and Doc It a long time ago (I use CTRL+SHIFT+ALT+<Enter> as the default).
  22. David Hoyle

    Why control methods (OnClick) can't be defined in Form Private section?

    I was trying to find an updated reference for this but it goes something like this... TComponent and all its derivatives (components on forms) are designed to be loaded and save to the DFM files, in binary format or text. The IDE uses this when you visually design a form and places all event handlers and component references in the top of a class which is a published scope. These contain RTTI information for the loading and saving mechanisms. When you run your application the same streaming mechanisms are used to load your forms from the DFM which are resources within your EXE. If you've moved the declarations to another scope other than published then they cannot be loaded either by the IDE or by your application at run-time.
  23. David Hoyle

    Why control methods (OnClick) can't be defined in Form Private section?

    All IDE managed components on a form and their event handlers must be published as this is the mechanism the IDE uses to load and save the form layout and event handler.
  24. David Hoyle

    Importing Excel2016 Type library into Delphi

    @ByteJuggler Out of interest (as I do COM DLLs for Excel 32 and 64) I assume you are having to import the 64-bit version as you do not have 32-bit and you want to use feature post Office 2002?
  25. Still can't find the article which I think was written by David Millington but my new Windows 10 system suggests that RAD Studio 10.3.1 is using .NET 4 (looking in the about dialogue's list of DLL version numbers).
×