-
Content Count
3524 -
Joined
-
Last visited
-
Days Won
116
Everything posted by Lars Fosdal
-
RESTDebugger fails where Postman succeeds
Lars Fosdal replied to dcroghan's topic in Network, Cloud and Web
I've used https://www.charlesproxy.com/ with success for seing exactly what is sent/received in a REST API. You can also inject it into a https connection as it acts as a proxy. -
RESTDebugger fails where Postman succeeds
Lars Fosdal replied to dcroghan's topic in Network, Cloud and Web
Bruno looks quite interesting! And, it's open source! -
Why TListView.OnItemChecked event called by ListView.Items.Add?
Lars Fosdal replied to Marsil's topic in VCL
Ref. the above mentioned leak. Does it occur if you set ListView.OwnerData to true? There is BeginUpdate/EndUpdate on ListView.Items, but not sure that would suppress item events. -
Did you override the HintWindowClass before Application.Run is executed? https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.Controls.THintWindowClass
-
Passing an SQL into a REST Request, and returning Result in JSON Dataset?
Lars Fosdal replied to Robert Gilland's topic in Network, Cloud and Web
Short answer: Yes Long answer: Yes, but don't! It would put your SQL database at risk. Instead, build a proper REST API as - it hides the underlying database - it allows you to change the underlying database operations without changing the client A REST API done right is far more secure and robust. -
Is it possible to implement floating/fully custom Dropdown Menus?
Lars Fosdal replied to araujoarthur's topic in VCL
TMS has a new customizable context menu which is cross platform. https://www.tmssoftware.com/site/blog.asp?post=2364 -
Share a data between two units in dynamic loaded BPL.
Lars Fosdal replied to CRO_Tomislav's topic in VCL
Isolate your business logic from the UI. Use an intermediate class to pass the data around. -
If you currently are a Delphi/RAD Studio subscriber, you can request access to the beta if you didn't already get an invite. As per the link in the starting post of this thread: Closing this thread.
-
Share a data between two units in dynamic loaded BPL.
Lars Fosdal replied to CRO_Tomislav's topic in VCL
I would decouple the action by having a handler. unit Druga; interface uses Dialogs; function Demo:boolean; type TOnShowMessage = reference to procedure; var OnShowMessage: TOnShowMessage; implementation // No circular ref here function demo: boolean; begin if Assigned(OnShowMessage) then OnShowMessage else raise Exception.Create('Someone forgot to set the OnShowMessage handler'); end; initalization OnShowMessage := nil; end. In Prva, I'd connected the handler in f.x. FormCreate; procedure TForm1.FormCreate(sender: TObject); begin Druga.OnShowMessage(Self.MyShowMessage); end; procedure TForm1.MyShowMessage; begin ShowMessage(Form1.Edit1.Text); end; This avoids the circular unit ref, and since you initialize the handler from the main form, it shouldn't matter if the bpl is dynamically loaded? If you want to, you can of course also add parameters to the handler to display a text generated in unit Druga or have multiple handlers for different uses. -
programmatically determine the edition of RAD Studio 12.3
Lars Fosdal replied to dmitrybv's topic in Delphi IDE and APIs
@dmitrybv I assume that in your real code, you retrieve the correct installation paths from registry? Edit: Also, see this for executing shell commands: -
@RDP1974 Dave is correct. Please remove your comment.
-
Delphi bug reports or feature requests to "vote"/comment for (important, fatal etc)/
Lars Fosdal replied to Tommi Prami's topic in Delphi IDE and APIs
It is possible to add a comment to the issue, but not sure if that would be more hurtful than helpful. -
Define conditional symbol in .dpr
Lars Fosdal replied to Vandrovnik's topic in RTL and Delphi Object Pascal
You can also define symbols in an environment variable, but then they apply to ALL projects you compile. dcc_define=Test;MagicSymbol;SomeOtherDefine dcc_define being the magic environment variable name which defines the symbols. Example: This one defines "foslar" - so that I can include code that I am working on but which doesn't compile in the project and commit/push to git without breaking the build server or messing up for other users. {$ifdef foslar} procedure DoSomething begi What was I thinking? {$endif} -
Version Control.
-
promise Introducing My Delphi TFuture PPL For Thread Safe UI
Lars Fosdal replied to bravesofts's topic in I made this
TEventually<T> 😛 -
promise Introducing My Delphi TFuture PPL For Thread Safe UI
Lars Fosdal replied to bravesofts's topic in I made this
But you are still blocking, if looping around a wait. Are you going to put a ProcessMessages in that loop? -
promise Introducing My Delphi TFuture PPL For Thread Safe UI
Lars Fosdal replied to bravesofts's topic in I made this
Wait = Block. Events = Asynch w/o block. -
I have a 5K 40" Lenovo, that can be split into two "virtual" displays. I can set up different resolutions and scalings on those when I need to test HighDPI. Generally speaking, the test results are so disheartening that I still stick with 100% scaling in the OS, and use BDS in DPI-Unaware mode.
-
promise Introducing My Delphi TFuture PPL For Thread Safe UI
Lars Fosdal replied to bravesofts's topic in I made this
Generally speaking I prefer offloading background tasks to a threadpool in-queue. The threadpool messages the main thread when the work is done. The main thread then retrieves the response from the threadpool out-queue.(i.e. mailbox principle). If there are multiple parallell tasks (i.e. a job), the main thread will need to know that, and whenever a thread completes, check if it fullfill the needs of the job and then fire off whatever should happen after the job is complete. There really is no single best way to deal with background processing - except ensuring that the main thread is not blocked. -
How to use Swagger via MARS REST API?
Lars Fosdal replied to KostasR's topic in MARS-Curiosity REST Library
I see there are several attributes relevant for the Swagger data, such as RequestParamAttribute, but I see very few examples of use. Github: search for "Param]" (without the quotes) I woud suggest you experiment with those to see what you get. -
How to use Swagger via MARS REST API?
Lars Fosdal replied to KostasR's topic in MARS-Curiosity REST Library
Ah, so how to generate complete Swagger info from your MARS API? -
How to use Swagger via MARS REST API?
Lars Fosdal replied to KostasR's topic in MARS-Curiosity REST Library
Not sure if I understand your question? Swagger is API documentation. Are you looking for how to generate code for MARS REST based on a Swagger definition? -
@audi30tdi We do all our EHF invoices through third party systems, so I have no Delphi code to offer. Are you looking for the specification of the EHF invoice document or code for sending the document to an http endpoint?
-
RAD Studio 12.3: E2213 Bad packaged unit format
Lars Fosdal replied to Chau Chee Yang's topic in Delphi IDE and APIs
Isn't that the type of error you get when you try to link a .dcu that is for the wrong platform? -
How much RAM for Macbook Pro M4 to Run RAD Studio 12?
Lars Fosdal replied to amit's topic in General Help
Apple's RAM and disk prices are ridiculous, but personally I'd go for at least 24GB and 1TB. My MBP M1 has 32GB/2TB.