-
Content Count
329 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Cristian Peța
-
Depends. I added only 15K LOC last year to my project. A lot of time I spend thinking how to add features asked by customers to actual app logic. This doesn't have to do with old code but to old app logic and not to break old behavior. An to leave space for feature improvements because this is a 20 years old project.
-
For this case will work with Variant. procedure DoSomething(const AParam: Variant); begin ShowMessage(AParam); end;
-
FastReport 5 vs 6: PDF export
Cristian Peța replied to Der schöne Günther's topic in Delphi Third-Party
If you are using TMetaFile in your report you can try to set AllowVectorExport to False for that component (in report editor). This way PDF export will work like version 5 generation an image. -
Installed 10.4 Patch (Patch Tool) Test 1.0 - Components needing Teechart don't work any more
Cristian Peța replied to microtronx's topic in Delphi IDE and APIs
Probably some test escaped in the wild... -
Fixed (see report).
-
Not usable for me yet. [TClientDataSet] Exception when a ftWideMemo is set to an empty string with LogChanges=True https://quality.embarcadero.com/browse/RSP-29431 P.S. Just updated the report with an other issue very probable related.
-
Here is @David Heffernan's response: https://stackoverflow.com/questions/25536216/delphi-prevent-application-shutdown
-
I must repeat: this is documented and is working "as designed" If you want an other behavior and don't want to do what documentation says the you need to find an other OS. Documentation says: "If your application must block or postpone system shutdown, use the ShutdownBlockReasonCreate function." Then when you are finished use ShutdownBlockReasonDestroy.
-
This is not just a message. You are waiting for the user to press You or No. And in this time you are not returning to the OS. Then the OS will simply kill you app.
-
This is documented here (read Remarks): https://docs.microsoft.com/en-us/windows/win32/shutdown/wm-queryendsession If you really need to stop the shutdown: "Each application should return TRUE or FALSE immediately upon receiving this message" So you must return immediately, not showing a message and wait... But... "Applications should respect the user's intentions and return TRUE" If possible it's better to save data in other place and next time you app is running again ask the user if he want to keep this data. Or even better, if you can, restore the app state exactly how it was at shutdown and you don't need to ask anything. The user will see your app exactly how it was at shutdown. That's how mobile app are supposed to work but it's nice also for desktop.
-
You are right, I didn't noticed. I made this procedure in a hurry from my code and there I need to save to a stream.
-
Then probably what I proposed (to adapt the component from FMX to VCL) is also too difficult for you. uses Vcl.Imaging.pngimage; procedure SaveBitmapToPNG(ABitmap: TBitmap; const AFileName: String; ACompresionLevel: Integer = 7); var img: TPngImage; strm: TFileStream; begin img := nil; strm := TFileStream.Create(AFileName, fmCreate); try img := TPngImage.Create; img.CompressionLevel := ACompresionLevel; img.Assign(ABitmap); img.SaveToStream(strm); finally strm.Free; img.Free; end; end; Here TBitmap is a Vcl.Graphics.TBitmap
-
TCameraComponent is using FMX.Graphics.TCanvas and you should replace with Vcl.Graphics.TCanvas and so on. Look what TCameraComponent is doing and do the same using Vcl units. Some things are not the same but with some work I think it should be doable.
-
Accessing camera has nothing to do with VCL or FMX. It should be feasible to copy what FMX.Media.TCameraComponent is basically doing (trimming all the FMX part) and make you own simple component for VCL. At least that's what I would do.
-
Difference between Pred and -1
Cristian Peța replied to John Kouraklis's topic in RTL and Delphi Object Pascal
I would like to have List.High or List.HighIndex or List.LastIndex or whatever. Why to write every time -1 when you want the last index? -
I don't understand. Have you reproduced this on your machine? Then you can debug and see the call stack. If not, then as @Lars Fosdal said: get MadExcept or EurekaLog and don't waste your time. I dot't know how EurekaLog is but with MadExcept you need only to install it and check the checkbox that you want it in your app. That's all. Then you will have a full call stack to see where this happens in your code.
-
Using Delphi in Virtual machine for a month
Cristian Peța replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I enabled out of curiosity the Hyper-V and shut myself in the foot because this enabled Credential Guard. VMware doesn't run with Credential Guard enabled. I lost an hour to turn it off. -
Set a PC environment based on a Country name..
Cristian Peța replied to Ian Branch's topic in General Help
Don't use date as string in SQL filters. Pass dates as parameters. That calendar component should give you the date as TDate or something, not string. -
FastReports VCL 6 - worst ever installation experience
Cristian Peța replied to a topic in Delphi Third-Party
It's easy with Web Installer. In menu Tools->Manage Platforms... Do you installed from ISO? -
What if somewhere this BitmapListAnimation1 is used while you call LoadFromFile? We don't see your code so what advice do you expect?
-
I think to get rid of RTF so I can go cross-platform but from your website I don't see how much is subscription.
-
Any Good tutorial on Parallel Programming Library?
Cristian Peța replied to Tommi Prami's topic in RTL and Delphi Object Pascal
If PPL is not working and OTL is overkill why not directly TThread? And you are in control. -
Messages for exceptions only for main thread?
Cristian Peța posted a topic in RTL and Delphi Object Pascal
I just realized that exception messages are shown only for main thread. I'm right? And if yes, why? madExcept will show exception for all app threads and I was surprised to see that without madExcept you can see exceptions for other threads only debugging from IDE. -
tDialogService.MessageDialog with ACloseDialogProc / need synchronize or not?
Cristian Peța replied to microtronx's topic in FMX
I tried with both TDialogService.TPreferredMode.Async and Sync and I see the same main thread in the procedure. So, no synchronize needed. -
Anyone compiled Android apps (api 16) for Industrial devices with Android 4.1.x
Cristian Peța replied to microtronx's topic in Cross-platform
I used minSdkVersion="14" in manifest. Works here on android 4.4.4 (older Honeywell 75e) I have a customer with Honeywell 70e and Android 4.0 but doesn't tried yet.