Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 02/13/19 in Posts

  1. Hi, When you make a code block it defaults to HTML syntax highlighting. For a Delphi forum it would be better if Pascal was selected by default.
  2. David Hoyle

    OTA Ide Shutdown

    Main form is call AppBuilder if I remember correctly and is available from the Forms collection in the Screen object. Have a look at my Delphi IDE Explorer plug-in (https://github.com/DGH2112/Delphi-IDE-Explorer).
  3. David Hoyle

    OTA Ide Shutdown

    The issue will be the timing of the events. Your main wizard will get destroyed at some point but I assume you are looking for the time period between File | Exit, etc and shutdown. I've not got an IDE available but you could install my notifier plug-in (https://github.com/DGH2112/DGH-IDE-Notifiers) (experimental) and switch on all notifiers and then close down the IDE then examine the log file to see what happens.
  4. Tommi Prami

    Property editor - on the finest art

    I would like to see this plugin to get more support, now that code is already there, and installer, maybe, to speed up the start... Edit, how anyone can understand what I menat, coz I can't 😄 Would be nice to have installer for different IDE-versions, so it would be easier to start using it. I would suggest, if possible, add some standard colorizxation of properties, but it should be configurable, but editing INI-file would be OK, to me anyways. Because there are so many components and different properties, and some are interested in very different properties... -Tee-
  5. joachimd

    How to get data from class to TVirtualStringTree?

    sure ... it's no big deal 😉 I only have two columns for this viewer: First is the caption, second the ID (for Debug purposes, usually not displayed). procedure TAppListViewer.treeviewGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string); var data: PSuperNode; begin try data := treeview.GetNodeData(Node); case Column of 0: CellText := data.obj.Caption; 1: CellText := ID2String(data.obj.ID); //btw: it's TGUID, but I leave it open for other datatypes end; except end; end; BTW: You can also define a function in your 'IAppListItem" interface to get the string your need (e.g. function GetText(column: integer): string)
  6. The Daraja HTTP Framework is a free open source library for Object Pascal (Free Pascal 3.0.4, Delphi 2009+), based on the stand-alone HTTP server component in Internet Direct (Indy). The 1.2.5 release improves UTF-8 support for Free Pascal by “using” the LazUTF8 unit. More information Home page: https://www.habarisoft.com/daraja_framework.html API documentation: https://www.habarisoft.com/daraja_framework/1.2/docs/api/ Getting started PDF: https://www.habarisoft.com/daraja_framework/1.2/docs/DarajaFrameworkGettingStarted.pdf GitHub: https://github.com/michaelJustin/daraja-framework Wiki: https://github.com/michaelJustin/daraja-framework/wiki
  7. Eugene Kryukov

    CrossVCL 1.06

    CrossVCL 1.06 is available. Start building macOS and Linux VCL apps with Embarcadero Delphi and CrossVcl. What's new: Added: GPGraphics's Save and Restore Added: State images support for TTreeView Added: WinAPI example Fixed #163: TGPGraphics.GetVisibleClipBounds Fixed: AV when working with ListView Fixed: ProgressBar returns wrong value for his properties Fixed: AV on hint showing Fixed: Selection by code doesn't work for TTreeView and TListView Fxied: Bunch of minor issues More info at: https://crossvcl.com 3rd-Party List at: https://crossvcl.com/tlist.html
  8. You are quite wrong. No point freeing it. No point even creating it.
  9. Make the function a static class function of a record: type TMyPassHandler = record public class function Pass<T:record>(const Value: T): Boolean; static; end; class function TMyPassHandler.Pass<T>(const Value: T): Boolean; begin Result := False; { do whatever is needed } end; Most of the time the compiler should be able to infer the proper type, so a call would look like: TMyPassHandler.Pass(myRec);
  10. Remy Lebeau

    First!

    I'm here!
  11. Dalija Prasnikar

    First!

    Really nice to see you here.
  12. Kryvich

    Test Bits in a Byte

    You can write it as If ((b and $01) > 0) or ((b and $08) > 0) or ((b and $80) > 0) then ... Or you can create an enumeration and use meaningful names for each bit. type TMyEnum = (mb0, mb1, mb2, mb3, mb4, mb5, mb6, mb7); TMyBits = set of TMyEnum; // = Byte in size function Test: Byte; var mbs: TMyBits; begin mbs := [mb0, mb3, mb7]; Byte(mbs) := $89; // It's equivalent of mbs := [mb0, mb3, mb7]; if mbs * [mb0, mb3, mb7] <> [] then // If one of bit is set ;//... if mbs * [mb0, mb3, mb7] = [mb0, mb3, mb7] then // If all 3 bits are set ;//... if mbs - [mb0, mb3, mb7] = [] then // If no other bits are set ;//... Include(mbs, mb1); // Set 2nd bit mbs := mbs - [mb3, mb7]; // Unset 4th and 8th bit //etc... Result := Byte(mbs); end; It's always better to deal with clearly named typed variables and constants.
  13. And sometimes fighting with bugs becomes too much and you just remove some functionality for specific subset of compilers. That's why OTL uses OTL_Generics and OTL_GoodGenerics.
×