Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/06/22 in all areas

  1. There are many legacy projects which are still in active production. This volume offers approaches to refactoring and modernizing the code base without the need for complete redesign and rewrite. Evolution, not revolution. These are approaches well suited to the incremental revision of production code, as is usually the concern with a commercial product. Motivated by my own experience with legacy apps and the need to find a manageable approach to transforming a product in current production. On Amazon: https://www.amazon.com/dp/B0B2TY6ZZ4
  2. Ian Branch

    Array within an array??

    Because I wasn't seeing it and getting more and more confused so I decided to take the easy way out. I put it down, had a coffee, and came back to it. I now have it.. type TForm26 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } type TLabelRecord = record iValue: Integer; iColor: Integer; end; type TLabelMatrix = array[1..12, 1..7] of TLabelRecord; public { Public declarations } end; var Form26: TForm26; implementation {$R *.dfm} procedure TForm26.Button1Click(Sender: TObject); var LabelRecord1, LabelRecord2: TLabelRecord; LabelMatrix: TLabelMatrix; begin LabelRecord1.iValue:= 123; LabelRecord1.iColor := 234; LabelMatrix[1,1] := LabelRecord1; // LabelRecord2 := LabelMatrix[1,1]; ShowMessage('Value = '+LabelRecord2.iValue.ToString); ShowMessage('Color = '+LabelRecord2.iColor.ToString); // end; Thank you for your patience & guidance. Ian
  3. That's strange! Managed to fix it though. The BASS .so files were not found with the TPath.GetLibraryPath function. While Googleing for this issue there seems to be some kind of new system for loading the .so files and the solution is to simply not specify a path for the LoadLibrary() call, the Android system picks the needed folder. So just use: BASSLibraryHandle := LoadLibrary(PChar('libbass.so')); This now seems working perfectly for both .apk and .aab. This goes for all the .so files that are loaded with LoadLibrary(). And in deployment the .so files are all remote path "library\lib\arm64-v8a\" (same as before for 64 bit). Thank you very much for helping! If it would be possible to check once again the install from Google Play Store (I updated the package, that seems working fine here now)? Thank you! 3delite
  4. Bought it! This looks like something I can really use! Thanks, Rob C
  5. The solution is to use the FloatToStr overload that takes a TFormatSettings and pass one that has DecimalSeparator set to dot. I typically declare such a TFormatSettings as const and fill all the fields that are required for JSON or some other textual format like this - the following for example is being used in Spring for converting various data types to string (from TValue): const ISO8601FormatSettings: TFormatSettings = ( DateSeparator: '-'; TimeSeparator: ':'; ShortDateFormat: 'YYYY-MM-DD'; LongDateFormat: 'YYYY-MM-DD'; TimeAMString: ''; TimePMString: ''; ShortTimeFormat: 'hh:nn:ss'; LongTimeFormat: 'hh:nn:ss'; DecimalSeparator: '.'; );
  6. Remy Lebeau

    Sending Email via GMail Using OAuth 2.0 via Indy

    FYI, this morning I checked in a new 'sasl-oauth' branch in Indy's repo, which includes a new 'IdSASLOAuth.pas' unit for SASL classes for OAUTH10A, OAUTHBEARER, and XOAUTH2 for TIdDICT, TIdPOP3, TIdSMTP, and TIdIMAP4. They are still a work in progress (ie, no parsing of response JSON yet), and you are responsible for obtaining the OAuth tokens externally (ie, over HTTP), but once you have the tokens then you can use these SASLs to login to the DICT/POP3/SMTP/IMAP servers.
  7. Anders Melander

    How to operate a private field in other unit?

    I'm still hoping that with will be completely eliminated from the language. Here's a few lines from the code I'm currently working on: begin ...3-400 lines of code... with vPlan.DataController, dbSlaktePlan, BLPlan, Grupper ,Data[Id] do begin ...a few hundre lines more... with vPlan, BLPlan.SiteSum, Plans[Id] do begin ...and it goes on...
  8. You have to use the Helper, only it and the use of WITH get you access, see my test code above. Plus that's not enough code for anyone to help you.. // Your helper should have a method like SetPrivateVar which uses 'With Self do' SomeClass.SetPrivateVar(TMyClassA2.Create());
×