-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
This will slowdown the app because of Memo performance, I use Selection for this if mLog.Lines.Count > 2000 then begin mLog.Lines.BeginUpdate; // Deleting lines one by one is damn slow. // So we take length of text and cut half of it mLog.SelStart := 0; mLog.SelLength := mLog.GetTextLen div 2; mLog.SelText := ''; // Remove probably partial line mLog.Lines.Delete(0); mLog.Lines.EndUpdate; end; This looks suspicious, shouldn't it be cliList [ i ]?
-
Firemonkey DLL: loading a TBitmap in initialization fails (solved)
Fr0sT.Brutal replied to Alexander Halser's topic in FMX
This is another evidence of what Raymond Chen has told in "Some reasons not to do anything scary in your DllMain" articles -
Is there a way to save Messages text on Android devices?
Fr0sT.Brutal replied to JohnLM's topic in Cross-platform
You mean, programmatically ? Because you can achieve the goal much easily with any SMS exporter. The cool one is My Phone explorer with PC client - I use it for more than decade -
Job Offer - 5 Delphi Devs for bit Time Professionals
Fr0sT.Brutal replied to Daniele Teti's topic in Job Opportunities / Coder for Hire
There are plenty of places where this "terrible" looks like Heavens -
Job Offer - 5 Delphi Devs for bit Time Professionals
Fr0sT.Brutal replied to Daniele Teti's topic in Job Opportunities / Coder for Hire
So, if you're in USA get $100k/yr, what real income is? -
delphi Virtual Listview does not work because 'un-select' is not reported
Fr0sT.Brutal replied to Bart Kindt's topic in Windows API
VirtualTreeView is worth trying -
delphi Virtual Listview does not work because 'un-select' is not reported
Fr0sT.Brutal replied to Bart Kindt's topic in Windows API
AFAIR you have to listen for state change event and analyze item state. IMHO Listview is an awkward and slow piece of crap. I advice to avoid it where possible -
Then Python4Delphi is your choice. There's even special section for it here in the forum
-
You can include necessary binaries to main one as resources and extract them at runtime.
-
You didn't say how these plugins should be linked to main app, probably something like RAD's Tools menu is enough? Otherwise you'll have to either include a script engine into app or have some interface a la COM in the main app for plugins to interact with
-
I still see no answer why these requirements. Moreover, what exact req's are?
-
Data display => locale-dependent Data exchange => hardcoded
-
Why does TRegistry.GetKeyInfo double the returned values of MaxSubKeyLen/MaxValueLen for far eastern locales?
Fr0sT.Brutal replied to David Heffernan's topic in RTL and Delphi Object Pascal
Probably it' something to do with UTF16 surrogate pairs which are used in Far East languages -
Why setting length to 0 at the start and end? Dynamic arrays are managed internally
-
Everyone is smart when looking back. I guess nobody could expect such a trap from Emba. For the future seems reliable to put CE inside a VM or at least block all its network activities. You'll never know when they decide to blame you for, say, working with CE via McD's public WiFi.
-
Worked a little. Hate it, just like I hate any C++ and additional stuff from VС itself
-
No strict rule, just the personal feeling. I also prefer as short as possible solutions for non-critical fragments, i.e. I won't create and maintain dictionary for a proc that is called rarely, just use array of const. Where the speed REALLY matters (parsers), all beauty of code and extendability could be sacrificed so there could appear constructions like case inp[4] of 'A': // switch STRA1, STRABC, STRADEF 'B': // switch STRB2, STRBCD, STRDXYZ
-
https://en.wikipedia.org/wiki/Set_(abstract_data_type)
-
Hard to tell without examples. Call stacks could vary for inlined functions but how optimization could cause difference?
-
TEnum + array[TEnum] of strings + case TEnum(IndexStr) => 1. Constants are extracted from code 2. array[TEnum] ensure constants are in sync with enum 3. named enum members are more readable than numbers 4. static analyzer (alas not the Delphi's) will how warning if case won't cover all possible enum values I used IndexStr approach in some of inline switches but it really doesn't look obvious. If this case is speed-critical, you probably have to use sorted array and binary search. However for low number of items it gains almost nothing. Dictionary also has its penalty of hashing the value to be searched for. In fact seems for short sets of short strings nothing beats dumb linear search in an array
-
Has too many mistakes. Even ChatGPT would write it better. Why not just do FindFirst(root+pattern) where pattern could be either mask or exact name?
-
Seems you need some centralized storage of data where all other apps could connect. It could be some 3rd party server or your generator app. Server could be message broker (MQTT etc) or Redis or a light database or simple custom HTTP/REST server. What option you prefer depends on your setup: - is generator app constantly running so it could be server - is adding config of server address to all clients acceptable - what components are allowable Some message brokers include 0-conf server autodiscovery (I can't name exact implementations however)
-
Probably the most clever and correct solution is WinAppDriver which relies on accessibility info that seems to be supported by FMX. Probably this could help as well
-
Why not extract only necessary external requirements to custom low-fat units and leave the unit of interest as is? Or there's too much deps?
-
TList descendant with overridden .Add that would run Find before actual adding?