Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 09/18/23 in all areas

  1. We have just released an open-source Delphi implementation for a HTML-based cross-platform application help system. Information page: Ziphelp - an open cross-platform help format Direct download link: https://www.helpandmanual.com/download/delphi-ziphelp-demo-source.zip About Ziphelp On the surface, Ziphelp is basically HTML in a compressed zip archive, hence the name. Pack any folder with HTML files into a zip archive and you are good to go. But Ziphelp is more than that, it is a protocol based on the standard sitemap protocol, designed to give a help viewer (here: the Delphi implementation) extended information about the content of the help system. That is help context numbers, help keywords, associative keywords, page titles. This information is missing in a standard sitemap.xml. Ziphelp extends the sitemap protocol and enables direct communication of an app with the help system. The Ziphelp protocol is not just for zip archives. It works inside an archive, with uncompressed folders or with HTML content loaded directly from a website. A Delphi desktop app may be deployed with local application help, uncompressed, zipped or embedded. A mobile or web application might not ship with local HTML content, but refer to an online version instead. The mechanism is the same in both cases and the TZiphelp component implements this for Delphi. Demo Application A demo app for VCL and FMX (Win/MacOS) is included. The demo builds on standard Delphi components (TWebBrowser) to display the help system.
  2. Dalija Prasnikar

    Double checked locking

    Instantiating TRttiContext at the beginning would not help in this case as the problem is in additional lazy loading. Also not creating global TRttiContext is also affected. Whatever you do it will be broken. However, depending on the Delphi version you are using, creation of global TRttiContext solves some other threading issues. And it is also faster than doing create... try..finally.. free approach. You can patch System.Rtti to fix the issue.
  3. Dalija Prasnikar

    Double checked locking

    I reported the issue as https://quality.embarcadero.com/browse/RSP-42359
  4. Dalija Prasnikar

    Double checked locking

    First of all, when asking about particular issue specifying Delphi version is mandatory. System.Rtti is being updated for literally every release (including updates). If you want us to comment on source code we need to make sure that we are looking at the same code. The code in question is perfectly fine. But the whole thing is broken in another place. Namely procedure TRttiInstanceType.ReadPropData; and other similar methods which use boolean for checking, but without double checked locking. This can causes calling LazyLoadAttributes twice which then can corupt the whole thing in that code. For instance I would get a crash on nil Finalizer instance. if FReadPropData then Exit; p := PByte(TypeData.PropData); TMonitor.Enter(Package.FLock); try // Here we would need to check FReadPropData again end exit if it is true classic := ReadClassicProps; ext := ReadExtendedProps; FProps := SubtractClassic(classic, ext); FAttributeGetter := LazyLoadAttributes(p); FIndexedProps := ReadIndexedProps; FReadPropData := True; finally TMonitor.Exit(Package.FLock); end; end;
  5. Dave Nottage

    TWebbrowser & camera permission

    The process on Android is to: Check the checkbox for Camera permission in the Uses Permissions of the Project Options Request the permission at runtime, e.g: PermissionsService.RequestPermissions(['android.permission.CAMERA'], procedure(const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray) begin if AGrantResults[0] = TPermissionStatus.Granted then // Permission was granted end );
  6. Angus Robertson

    TRestOAuth and token under basic authentication

    This improvement is now in SVN and the overnight zip, there is a new TOAOption of OAopAuthBasic that causes Basic Authentication to be used instead of sending the client ID and secret as parameters, Microsoft accepts both methods. Angus
  7. Setting the stream.size to 0 usually is the equivalent of Clear but that depends on the implementation of the actual TStream descendent you are using. Btw.: TeamB was a group of users offering support to other users on the old Borland newsgroups. As recognition they received goodies like free product licences, a bit like the current Embarcadero MVP program, and we had dedicated support partners at Borland. All that slowly died off after Codegear took over, unfortunately.
×