Jump to content


Popular Content

Showing content with the highest reputation since 06/27/20 in all areas

  1. Uwe Raabe

    TTabSheet - Set color and remove margin?

    Seems that a TCardPanel is better suited for your needs.
  2. The new features of this compiler are just untested/unfinished... Even the type helpers are broken with sub-types: if you define TMyInteger = type integer then you can't use myinteger.ToString... Non-inheritance is a "feature" which IMHO is wrong. What always work, and is the very same, is to write: TUsers = array of TUser; > Too bad we are working with Delphi where it does not matter because I can still assign a TUserName to TUserFirstName Yes, only var/out variables have compile-time strong checking... But at least you can read the code and verify the consistency either since the type (and RTTI) are explicit. And refer to the type definition comment as documentation. And it also helps writing more natural code, by having the type defined in the time, not in the parameter I prefer: function CopySession(source, dest: TSessionID): boolean; .... property session: TSessionID; instead of function CopySession(sourceSessionID, destSessionID: integer): boolean ... property sessionID: integer;
  3. Edwin Yip

    SynEdit preferred version?

    This is not the correct process as I understand it, you should: - Fork the repository on github web, so you that have your own repository that you can permission to make changes - Clone your forked repository to your local pc - Change the source code as needed (following the contribution rules, if any) - Commit and push your changes to your forked repository - Make a pull request to the original SynEdit2 repository, and wait for acceptance
  4. santiago

    Ctrl Tab Ide Plugin

    The way the Ctrl+Tab shortcut works in the Delphi IDE was always very inconvenient for me. Actually the Delphi IDE is the only program I can think of that does not navigate open documents based on the order in which they were last activated but instead on the order in which the tabs are arranged in the editor. So if you are were working in DocumentPrevious and switch to DocumentNext, I am used to going back to DocumentPrevious by hitting Ctrl+Tab. But in the Delphi you will navigate to whatever document is on the right side of DocumentNext. This has always been very annoying for me. Anyhow I made plugin that makes Ctrl+Tab behave to what I am used to from other programs, like Visual Studio for example. Might be of use for some. https://github.com/santiagoIT/DelphiCtrlTab Precompiled binaries are available for Delphi Seattle, Rio and Sydney.
  5. Kas Ob.

    Ctrl Tab Ide Plugin

    It is doable and easy. type TColorScheme = record PathColor: TColor; FileNameColor: TColor; SelectedBG: TColor; end; const COLOR_SCHEMES : array [0..1] of TColorScheme =( (PathColor : $003853EB; FileNameColor : $000E5F3D; SelectedBG : $00EEE1D0), (PathColor : clGrayText; FileNameColor : clBlack; SelectedBG : clSilver)); procedure DrawColoredFileName(aCanvas: TCanvas; aRect: TRect; const aFileName: string; aColorScheme: integer = 0); var LPath, LFileName: string; LPathPxLen, LFNamePxLen: Integer; LFNameX: Integer; begin LFileName := ExtractFileName(aFileName); LPath := ExtractFilePath(aFileName); // get Path Length in Pixles LPathPxLen := aCanvas.TextExtent(LPath).cx; LFNamePxLen := aCanvas.TextExtent(LFileName).cx; // Draw Path aCanvas.Font.Style := []; aCanvas.Font.Color := COLOR_SCHEMES[aColorScheme].PathColor; aCanvas.TextOut(0, aRect.Top, LPath); // Draw FileName aCanvas.Font.Style := [fsBold]; aCanvas.Font.Color := COLOR_SCHEMES[aColorScheme].FileNameColor; // over draw long path instead of hiding file name if LPathPxLen + LFNamePxLen > aRect.Right - aRect.Left then LFNameX := aRect.Right - LFNamePxLen else LFNameX := LPathPxLen + 2; // 2 pixel margin, can be constant too aCanvas.TextOut(LFNameX, aRect.Top, LFileName); end; procedure TForm10.CheckBox1Click(Sender: TObject); begin ListBox1.Invalidate; end; procedure TForm10.ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); var ListBox: TListBox absolute Control; begin if odSelected in State then ListBox.Canvas.Brush.Color := COLOR_SCHEMES[Ord(CheckBox1.Checked)].SelectedBG else ListBox.Canvas.Brush.Color := clWhite; ListBox.Canvas.FillRect(Rect); if (Index > -1) and (ListBox.Items.Count > Index) then begin DrawColoredFileName(ListBox.Canvas, Rect, ListBox.Items.Strings[Index], Ord(CheckBox1.Checked)); end; end; This just an example on how to do it, hope you like it, and remember to put Style of the listbox to OwnerDraw Two things though: 1) That code doesn't handle the different states, selected, grayed, focused...etc, this is up to you to do and learn. 2) No DPI scaling fixing or handling, for that i think we both ( you and me) need someone to explain on how to do it right, on Windows 10 and older versions. Away from that, i really suggest to start with this example ( others may suggest better approach), but that is not the point, the point is after you do this, you will have way better understanding how VCL does drawing in general and its capabilities, it will be useful experience and knowledge to have. the result of that code is like this
  6. Achim Kalwa

    Reproducible AV in Sydney

    This bug is not related to Imagelists or images at all. It also happens with just a single component on the form (e.g. a TLabel). It seems like "view as text" invokes the new LSP-based parser, which crashes.
  7. Uwe Raabe

    Search for Usages not usable

    If we can gather some more votes for that issue I will be happy to point the product management to it. As it seems to be some low hanging fruit (looks like a missing MoveViewToCursor call), we might have this being included in 10.4.1.
  8. Georgge Bakh

    Search for Usages not usable

    Find usages is one of the most useful and most frequently used features of a code editor. Must work flawlessly.
  9. Stefan Glienke

    Your RAD Studio 10.4 Sydney issues

    FWIW - reported as https://quality.embarcadero.com/browse/RSP-29564
  10. I have uploaded a new development snapshot for the (upcoming) IDE Fix Pack 6.5 IDE Fix Pack Snapshot Download What's new: Added: (IDE) Fix for RSP-23006: Edit controls in the ObjectInspector aren't clipped by the scrollbar anymore (10.3+) Added: (IDE) The compile progress dialog is updated only every 80 ms now. And if a remote desktop session is detected it is only updated every 250 ms. The IDE compiler runs in the main thread, so every GUI update affects the compilation time. Added: -x--jdbg compiler option extension that creates and attaches a jdbg-file. You don't need a detailed map file (-GD) anymore to create or attach a jdbg-file for the binary file. Attaching the jdbg PE section is done after the linker closed the binary file. -x--jdbg and -x--jdbg=1 create a jdbg-file -x--jdbg=2 attaches the jdbg data to the executable/dll/bpl. Question: "Why is the jdbg file smaller than my old file?" - Answer: "The old file was created with an older version of JclDebug.pas." Added: -x--unitstats compiler option extension outputs unit filenames for units with "unitname in 'filename'" entries. Added: -x-fvs compiler option extension also generates faster interface call stubs for virtual methods that are final or in a sealed class. Added: Package compilation is a lot faster in the linker and cleanup phase. Added: Faster ObjectTextToBinary (DFM) implementation by removing unnecessary string comparisons. This improves the linker's performance when it converts DFMs to resources. Added: Faster map file creation by using a much faster Sort-By-Address implementation and a faster \n to \r\n converter. Added: Faster unitname to unit filename resolving (unitname in 'filename') The compiler used a Byte as hash-value and a single linked list. The code is now replaced by a hash-map with a 32 bit hash-value. Added: Faster compiler inline handling for projects with lots of units. Added: The command line compiler uses a double linked unit list to remove and reorder items faster. The IDE compiler still uses the original single linked list because some other code in the IDE does something with it and I couldn't make it not crash. Added: LoadString cache for compiler error/warning/hint messages. The compiler loads the warning/hint string and then decides not to show it. The cache prevents the compiler from calling LoadString too often. Added: Some PAnsiChar/PWideChar RTL optimizations for the IDE and IDE Fix Pack. Fixed: Compiler option extensions didn't work in dcc*.cfg and project.cfg files. Now you can specify -x-* options also in *.cfg files. Fixed: Don't crash if a 3rdParty tool destroys the Castalia Clipboard Form. Fixed: -x-cgo compiler option extension crashed the 10.3 compiler. Removed: The "Exception catcher" patch for ErrorInsight is no more. It didn't have any functionality.
  11. MarkShark

    SynEdit preferred version?

    Hey all. I use SynEdit in a few projects and I was wondering if anyone has insight on which of the various version is the preferred one to use. I'm on 10.4 and don't need backwards compatibility btw. The one that is on "GetIt" appears to be an older version (1.5.) The one listed as SynEdit2 on github by pyscripter appears to be active, includes some nice changes (ole drag and drop for example) lots of fixes and cleanup (some related to removing support for older Delphi versions.) The one listed as SynEdit/SynEdit on github which seems to be more actively developed then the other two. I've worked with the second two and, as always, it seems when working with third party components I have to make a few changes to the source (adding some missing properties, fixing the extra space on word wrap lines (thanks to a stack overflow answer) and a few other minor issues) which have to be merged into each new update, so picking the "correct" one will obviously help. On a side note I have a feeling that the correct answer might be that there is no correct answer... Just looking for any feedback or thoughts. And this post wouldn't be complete without thanking and acknowledging all the great work people have done on these projects! -Mark
  12. limelect

    3 explorer running

    As I said we will meet again Today I had my problem again. Explorer was hidden. A while ago I wrote a program that shows the explorer directory name although explorer was HIDDEN. So I had an indication. Searching again for an answer I found a solution. https://stackoverflow.com/questions/12946150/how-to-bring-my-application-to-the-front I added SetWindowPos(WebBrowserApp.HWnd, HWND_NOTOPMOST,0,0,0,0, SWP_NOMOVE or SWP_NOSIZE); SetWindowPos(WebBrowserApp.HWnd, HWND_TOPMOST,0,0,0,0, SWP_NOMOVE or SWP_NOSIZE); SetWindowPos(WebBrowserApp.HWnd, HWND_NOTOPMOST,0,0,0,0, SWP_SHOWWINDOW or SWP_NOMOVE or SWP_NOSIZE); and it worked. It poped up explorer. Thanks again
  13. Clément

    Reproducible AV in Sydney

    @Lars Fosdal Thanks for confirming it! QP Issue : https://quality.embarcadero.com/browse/RSP-29845
  14. Vandrovnik

    Search for Usages not usable

    I have voted... And I am curious whether it will be fixed before the report is 5 years old 🙂
  15. Try going to to Options -> IDE - File Associations and doing Deselect All, Select All and Save. That should restore file associations for version where you have run Options dialog. In theory file associations will be reset as soon you save Options even without going to File Associations tab.
  16. You are not very clear, I believe mars translates everything to unicode, I have no issues with UTF8 encoded content.
  17. dummzeuch

    Strange text effect

    fixed in revsion #3182 on 2020-06-06
  18. Microsoft File Explorer is such an outdated legacy tool. When you use Directory Opus as a replacement for Microsoft File Explorer you get an automatic preview of ALL text files (including all Delphi file types of course) with syntax highlighting and these features: The Directory Opus preview uses the preview handler from Rodrigo Ruz and has everything you could wish for in your wildest dreams:
  19. Sherlock

    Pipeline with global variable

    Sorry, didn't catch the subform. Can't help then.
  20. Remy Lebeau

    One more memory leak and FastMM4

    The stack trace you showed is complaining that the character data for the UnicodeString returned by TJSONString.Value is what is being leaked. That UnicodeString is assigned to your private FToken variable. Which means the TBetFairApi object that is holding that UnicodeString is not freeing that UnicodeString properly. Either because itself is being leaked as well, or you have a bug elsewhere in your code that is overwriting the UnicodeString's internal pointer to the allocated character data. Either way, this is happening after TBetFairApi.GetToken() has exited, so the problem is not in TBetFairApi.GetToken() itself. The leak report is merely showing you the call stack leading up to the memory allocation that leaked, not the call stack leading up to the leak itself. That was a typo in my example. I meant to free only the TJSONValue that ParseJSONValue() returns, not the TJSONValue of the 'token' field. I have corrected that mistake in my earlier example.
  21. David Heffernan

    One more memory leak and FastMM4

    Dude, just make a minimal example and debug that. Post it here if you want. Really good discipline to learn how to make that minimal example.
  22. pyscripter

    SynEdit preferred version?

    I will start with a bit of history. The Original Code is based on mwCustomEdit.pas by Martin Waldenburg, a great programmer. The key feature of the editor was fast syntax highlighting. This was more than 20 years ago. After a split of the community the SynEdit project was formed maintaining some of the key features of mwEdit. Over the years some of the best Delphi programmers contributed to the project. The list includes for example Gerald Nunn, Eric Grange, Jordan Russell and many many others. Flavio Etrusco added word wrap and Maël Hörz added unicode support (but in a rather idiosyncratic way). However the project management was very weak and the code gradually became very hard to maintain and improve. It aimed to support very old Delphi versions including Kylix and the code became full of IFDEFs and patches without an overall coherence. An early fork of Synedit is part of Lazarus but the two development efforts have diverged a great deal. When Embarcadero introduced the GetIt package manager they asked Roman Kassebaum to produce a version of SynEdit for GetIt. Roman did a general code cleanup removing support for early Delphi versions and Kylix (Turbo fork(s)). I have added support for code folding (the first major new feature for years) to both the Turbo fork and the main Synedit repository. However the Turbo fork(s) were not actively supported or developed beyond recompiling for new Delphi versions and the main Synedit branch was too hard to work with, hence the creation of SynEdit-2 as a fork of Turbo SynEdit. Main new features in SynEdit-2: Replaced SynRegExpr with the built-in RegularExpressions Move/Copy Line(s) Up/Down commands as in VS Code Delete Line command should work with multi-line selection Handle triple and quadruple clicks for selection Triple click and drag should select lines Double click and drag should select whole words Support OLE Drag & Drop What are the key features missing in Synedit: Better Unicode handling: Better support for wide characters e.g. Chinese ideograms (爾雅爾雅爾雅爾雅) Support for surrogate pairs (two widechars correspond to one glyph) Combining characters (e.g. Åström ḱṷṓn) Multi-cursor and multi-selection editing as in VS Code. When these features get implemented I think SynEdit will become comparable to some of the best editors around. But both of them require major rewriting of the code. Work on the second is well advanced and the unicode work is in the planning stage. Of course it is your choice as to which version of SynEdit to use, but if anyone wants to contribute to the development you are very welcome.
  23. Lars Fosdal

    ParnassusCoreEditor.dll AccessViolation

    10.4 has an update to Bookmarks and Navigator. It creates C:\Program Files (x86)\Common Files\ParnassusShared and places ParnassusBookmarks_XSydney.dll ParnassusCoreEditor_XSydney.dll ParnassusNavigator_XSydney.dll So, to cure the 10.3 ailments, copy from C:\Users\<username>\Documents\Embarcadero\Studio\20.0\CatalogRepository\ to the first mentioned common catalog Bookmarks-1.0\ParnassusBookmarks.dll to ParnassusBookmarks_XRio.dll ParnassusCoreEditor-1.0\ParnassusCoreEditor.dll to ParnassusCoreEditor_XRio.dll Navigator-1.0\ParnassusNavigator.dll to ParnassusNavigator_XRio.dll
  24. Geoffrey Smith

    Sending Email via GMail Using OAuth 2.0 via Indy

    I've updated my project so it now not only sends messages via gmail... but it can send hotmail.com/live.com/outlook.com emails. GmailAuthSMTP supports the XOAUTH2 and OAUTHBEARER authentication types and so could probably support other mail providers if they use those standards as well. https://github.com/geoffsmith82/GmailAuthSMTP/
  25. Fellow Delphi Developers!StyleControls VCL 4.15 just released!http://www.almdev.comWhat's new:* added: TscGPPageViewer control - transparent page control with pages, which inherited from TscGPPanel (see new CustomGPUWP_MultiView demo)* added: new shape styles for TscGPButton, TscGPGlyphButton and TscGPCharGlyphButton controls (scgpLeftLine, scgpRightLine, scgpTopLine, scgpBottomLine)* added: ScaleInt, ScaleDouble methods to the TscStyledForm component (scale values unsing scale factor of current form)* added: TscGPPanel.BlurBackgorund and TscGPPanel.BlurBackgorundAmount properties (now background of the panel can be with blur effect)* added: High-DPI UWP MultiView Demo (UWP demo template, which helps you to create Modern Application with MultiView UI)Regards,Almediadev