-
Content Count
3319 -
Joined
-
Last visited
-
Days Won
110
Everything posted by Lars Fosdal
-
BestPractices: To raise, or not to raise ... an Exception in a class constructor
Lars Fosdal replied to Rollo62's topic in Algorithms, Data Structures and Class Design
I prefer NOT to raise exceptions in constructors - class nor otherwise. It makes securing the build up of the instance hierarchy too complicated. A lack of connectivity or functionality should only be addressed at the time of use, not at the time of instancing, considering their absence may be temporary. There is one case though - during testing, assertions may be used to check for stuff that SHOULD be in place. -
That worked better.
-
Hmm... Wordpress is acting up and sending me to my own site when I try to follow the link.
-
Just my two cents: The migration to FireDAC is very much worth it, just to avoid all the BDE pitfalls. Not to forget that it also gave us a massive performance boost for our MS SQL Server use.
-
Dave, you are a goldmine 🙂 There appears to be several must do, should do, could do (or do not's) that would help the fledgling developer to get started in a good way, and I bet those were hard earned learning points? I would love to see you author an article (or a book) on the ins and outs of doing an Android app with Delphi! Thank you for all your contributions, and a Happy New Year to you!
-
Activity View - condensed/expanded not working lately
Lars Fosdal replied to Vincent Parrett's topic in Community Management
Daniel is on it. -
For algorithms to be maintainable and testable, they need to be separated from the UI. The UI can deliver inputs, but the math/logic needs to be black boxed seen from a UI perspective.
-
List of most popular UI components for VCL
Lars Fosdal replied to Jaska's topic in Delphi Third-Party
I use only TMS VCL UI Pack and FastReports for VCL. The more third-party libs you use, the more dependencies you have on the next major upgrade, and the more testing you must do on the arrival of new versions of the libs. Less is more. -
3rd party Android app or Apple app stores
Lars Fosdal replied to TimCruise's topic in Cross-platform
I disagree. Security is a major factor. Ref. Apple app store for macOS is not limited like iOS. You can distribute stand-alone installation packages for macOS, but not for iOS. -
How do you acquire "Pictures" to be used in your project?
Lars Fosdal replied to TimCruise's topic in Tips / Blogs / Tutorials / Videos
For actual images, I usually try a google search that starts with "image creative commons" then a description of what I am looking for. -
Currently in quarantine myself. Got a message on the anonymous tracking app that I had been near someone that had Corona. Getting tested today. Hoping that it was a red herring, since I've already had Covid in March and have gotten two shots since then.
-
How do you acquire "Pictures" to be used in your project?
Lars Fosdal replied to TimCruise's topic in Tips / Blogs / Tutorials / Videos
https://www.flaticon.com/ has an insane number of SVG icons, many of which are free. Using SVG plugins for Delphi, or Inkscape (free image editor) to convert to any format you need, -
3rd party Android app or Apple app stores
Lars Fosdal replied to TimCruise's topic in Cross-platform
I am an Android user, and I never use anything except the Google Play appstore. I have done a few sideloads, but that has been from sources that I trust fully. Apple doesn't allow other app stores nor does it allow/enable sideloading - unless you void any remaining warranty and jailbreak your iOS device. My personal advice would be to stay away from unofficial "stores" as they are likely to be ripe with exploits and will drag you down into the mud. -
Is the second computer logged in with a different user? Does that user have access to the share? How are the files opened? Make sure you open them read only, deny none. If the files are opened in a third party tool, you might not have control over that. Using the SysInternals Process Monitor may offer insights to what it is that goes wrong.
-
Timely info from EMBT: <crickets>
-
Move current entity to another unit?
Lars Fosdal replied to PeterPanettone's topic in MMX Code Explorer
To reap the benefits. -
Move current entity to another unit?
Lars Fosdal replied to PeterPanettone's topic in MMX Code Explorer
Uwe is the maintainer of the tool. His decision has been made clear. Ref. code visibility challenges: Dependency Injection (DI) can solve the challenge of doing form specific actions from a unit that ideally should not know anything about the form instance. unit uTransparencyManager; ... type TProcHandler = reference to procedure; THanderList<T> = class(TList<T>) procedure Execute; // loop through handlers and call each of them end; TProcHandlerList = class(THandlerList<TProcHandler>); var ResetHoverColor: TProcHandler; implementation { THanderList<T> } procedure THanderList<T>.Execute; begin for var Handler in Self do try Handler(); except // log end; end; initalization ResetHoverColor := TProcHandler.Create; Here, TForm1 could register their method with the ResetHoverColor.Add(Self.ResetHoverColor) during FormShow and unregister with ResetHoverColor.Remove(Self.ResetHoverColor) during FormClose (or wherevere appropriate). Drawbacks - DI requires a little scaffolding code. Benefits - uTransparencyManager does not need to know each form - TForm1 does not need to expose internal properties - Only the forms that actually are in use will be added to the handler list. - The ResetHoverColor.Execute loop can have a common exception handling wrapper to deal with misbehaving proc handler code (form = nil, errata in the injected code, etc) -
@mvanrijnen - I wish you a speedy recovery!
-
Developing under Windows 11 in a VM not feasible ?
Lars Fosdal replied to A.M. Hoornweg's topic in General Help
Hyper-V VMs are portable, and generation 2 supports a virtual TPM. https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/learn-more/generation-2-virtual-machine-security-settings-for-hyper-v Encryption of the image seems to be optional.- 26 replies
-
- virtualization
- vmware
-
(and 1 more)
Tagged with:
-
Online examples of Android & iOS apps programmed by RAD Studio
Lars Fosdal replied to TimCruise's topic in Cross-platform
There is no official support for personal MacOS VMs from Apple, and the use of unsupported VMs is a breach of Apple's IP. The discussion of illegal use of software is not allowed on DP, so please refrain from discussing such issues here and delete your related commentary. -
Generallly speaking - do you start with the generic (read Win32) application and develop that until it is feature complete before you start on the adaptations for Android/iOS/MacOS - or do you work on all platforms at the same time?
-
There are conditions discussed here https://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Forms.TCommonCustomForm.KeyDown for how that "keystroke" is propagated. Can it be that a control eats the event?
-
Me too, and I use the Expanded view mode.
-
I am doing primarily FMX, and it is a simple app, visually. Currently, I am just doing the "plumbing" - i.e. make all the non-UI stuff solid so that integration with the UI will be as thin as possible - and in the process - building up a cross platform toolbox. The solution needs to collect data over time to build a historical database, and I am thinking about how I should best do this. Ideally, I would do it centrally - so that the data only needs to be collected once for multiple concurrent viewers, but where to host it so the collection can happen 24/7 and I don't have to pay an arm and a leg? If I can't do it centrally, the app would need to both be UI and a background task so that data collection continues also when the app is not in use. This is a hobbyist project that I do as an exercise for learning FMX and cross platform, and if I decide to share it with everybody, I will prefer not to be responsible for a "backbone". I also want it to be as low cost and reliable as possible (there you have an oxymoron 😛) and simple to set up.
-
The generics in Lazarus is even more gimped than Delphi's generics. Not a viable alternative, IMO.