RaelB
Members-
Content Count
77 -
Joined
-
Last visited
Everything posted by RaelB
-
Which Database do you want to use? I like Delphi-ORM. It is easy to use. It does not create the database tables. I have a fork at https://github.com/raelb/delphi-orm - it creates the session object for SQLite without requiring a config file..
-
Looking for thread-safe repeatable random sequence generator
RaelB posted a topic in Delphi Third-Party
I'm wanting to generate a repeatable random number/character sequence based on a given seed value. Using the in built Randomize function with global RandSeed can do this, but is not thread-safe. Any recommendation for open source/light weight solution? Thanks -
Hi, Anybody know which iconset is being used in PowerArchiver 2022?
-
oh..found it.. 🙂 https://icons8.com/icons/fluency
-
How to execute code "synchronously" or know when script is done?
RaelB posted a topic in Python4Delphi
The GUI examples work fine for demonstration purposes, but how do I use the components to execute python code and get a result within my own code, i.e synchronous execution, or be notified when execution is done? e.g: S := PythonExec(input_script) Then I can use S in next line of code, or in an event that notifies script is done. Thanks -
How to execute code "synchronously" or know when script is done?
RaelB replied to RaelB's topic in Python4Delphi
By bad, it looks like the code does in fact execute synchronously.. -
Hi, The docs explicitly state that TOmniCounter is thread safe. Is the same true with TOmniValue?
-
fgxnative FGX Native - crossplatform mobile native development
RaelB replied to Yaroslav Brovin's topic in Delphi Third-Party
What does FGX stand for? 🙂 -
Hi, In a control with scrollbar, is it possible to detect when the user clicks down and then up on the middle scrollbar button (i.e. draggable part of the scrollbar)? Thanks
-
Thanks. So if a TForm is holding such a component, e.g. TVirtualStringTree, how can I write a method on the form, such that it will be receiving those scrolling messages from the VST?
-
Is it possible to write "generic" code for TObjectList<T> descendants?
RaelB posted a topic in RTL and Delphi Object Pascal
Hi, I create object list collections as below: TNotes = class(TObjectList<TNote>) public ... end; TBooks = class(TObjectList<TBook>) public ... end; etc.. Is there a way I can write some generic code that will be able to take in TNotes or TBooks instances, for e.g.: function ListToJSONString(List: TObjectList<T>): string; begin ... end; I want to call as: s := ListToJSONString(FNotes) or s := ListToJSONString(FBooks) But the function does not compile... Can such a function be declared, or do I need to change my definition of TNotes and TBooks? (I don't like using TObjectList<TNote> or TObjectList<TBook> in my code, since I want to create local (i.e. public) methods for each list type, and it is also simpler writing TNotes instead of TObjectList<TNote> each time) Thanks -
Is it possible to write "generic" code for TObjectList<T> descendants?
RaelB replied to RaelB's topic in RTL and Delphi Object Pascal
Thanks, both solutions work for me. with the TSerializeJSON, I can make it a bit simpler (since I am really after a function) TSerializeJSON = class public class function ToJSON<T: class>(AList: TObjectList<T>) : string; end; Then i can call without declaring a variable 🙂 -
Is using "TJSON.ObjectToJsonObject" to convert an object into a TJSONValue (and ultimately into a string). Is it possible for this conversion to leave out a specific field/fields, for e.g. using some type of attribute? For example: TPersistItem = class(TPersistent) private FChangeStatus: TChangeStatus; FId: Variant; FLoading: Boolean; procedure SetId(const Value: Variant); protected ... procedure SetChangeStatus(const Value: TChangeStatus); public ... published property ChangeStatus: TChangeStatus read FChangeStatus write SetChangeStatus; property Id: Variant read FId write SetId; end; I don't want fields "ChangeStatus" and "Loading" to be included in the result. Thanks
-
Is it possible to skip a field/property when using TJSON.ObjectToJsonObject?
RaelB replied to RaelB's topic in RTL and Delphi Object Pascal
Thanks! -
Hi, I ask this question because I don't have 2 monitors so I can't test this for myself. Is moving from Per Monitor V1 to Per Monitor V2 "only good and no bad", or does one need to take care of certain things when making the move? By "only good and no bad", I mean there will be advantages, however, if certain V2 related events are not handled, the behaviour will default to V1 behaviour.. Thanks Rael
-
Thanks for the info :).
-
So how do you manage working in an IDE with all those different lib versions? - Do you use specific IDE's for specific projects? - Are you using any tools to help you with that?.. Peter Below, once told me this: Perhaps you are using this idea..
-
Can one include a TDataModule with DB components in a console application? I tried to do so, and was encountering some errors in the IDE (Delphi 10.3). Well that just might be a temporary thing in the IDE, or is this something one should not/can not do? Thanks
-
Hello, I have opened an old open source project in the IDE (10.3), and breakpoints seem to have been disabled for this project. Q1. How can I re-enable breakpoints? In "Linking" I have set "Debug Information" = True, and "Map file" = Detailed. What other setting is relevant here? Q2. Another thing is that whenever an error occurs, the IDE goes straight to CPU view. How do I revert to the usual behaviour of going to the line of code where the error occurred? Thanks Rael
-
Hello, I find when I lose my internet connection, the Delphi IDE hangs for a significant amount of time, maybe 1-2 minutes. Is there some option(s) that I can disable so that I will not experience this? I am on Delphi 10.3.2 Thank you Rael
-
Hi, I'm using 15.0.33. If I change to Dark Theme, and then back to Light theme, the members area remains dark: If there are members, they will fill up the box with the correct theme, but there is still an area left in dark theme: I'm using Delphi 10.3.2 Thanks
-
Ok. Recently, I have been using Dark Theme at night and Light Theme during the day, so have been switching themes quite frequently .
-
Hi, I'm using Delphi 10.3.2, and MMX 15.0.30. Frequently when I switch to the MMX tab (it is docked together with the Structure and Object Inspector Tabs), it is blank. If I switch to another tab (i.e. Object Inspector), and then back to MMX, then it will appear normally.
-
Hello, I have been using the IdCoderTNEF unit to decode winmail.dat messages. This has worked fine for me in the past, however in the last couple of months, I have been receiving this error when trying to parse such messages: EIdTnefUnknownMapiType: Encountered unknown MAPI type: 72, attribute: 32768 I am using the latest version of IdCoderTNEF from the github repo (Latest commit 5fb9225 on 26 Nov 2019 ) Part of my code looks like this: var J: Integer; TnefMsg: TIdMessage; TNefCoder: TIdCoderTNEF; begin .... for J := 0 to IdMessage.MessageParts.Count - 1 do begin if IdMessage.MessageParts[J] is TIdText then .... if IdMessage.MessageParts[J] is TIdAttachment then begin ... TNefCoder := TIdCoderTNEF.Create; try if TNefCoder.IsFilenameTnef(IdMessage.MessageParts[J].FileName) then begin TnefMsg := TIdMessage.Create(nil); try TNefCoder.Parse(IdMessage.MessageParts[J] as TIdAttachment, TNefMsg); ProcessMessage(TNefMsg); finally TnefMsg.Free; end; end else SaveMessagePart(IdMessage, IdMessage.MessageParts[J], UserName); finally TNefCoder.Free; end; end; end; .... Are you aware of such an issue? Thanks