

Brian Evans
-
Content Count
417 -
Joined
-
Last visited
-
Days Won
6
Posts posted by Brian Evans
-
-
Introducing new variables isn't the same as WITH which just adjusts how the compiler handles scoping for which reference a name refers to at compile time.
If introducing a new variable isn't an issue may as well use inline variables with type inference for modern Delphi at least.
procedure TMyForm.UpdateInventoryItem(const NewQty: Integer); begin var A := dmStoreInventoryData; var B := A.tblUpdateItemForStore; B.Edit; B.FieldByName('Qty').AsInteger := NewQty; B.Post; end;
-
1
-
-
2 hours ago, Darian Miller said:My guess is that Aliasing would bring in a new set of problems but if it's just a preprocessor type replacement, it might be OK.
But look at your example code - what is the scope of "NewQty"? Does it belong to A, to B, or to the Form, or to a variable or method somewhere? If it doesn't belong to A or B, what if "NewQty" is added to A or B as a property or method later? Boom, your with-bomb will explode into a nice bug.In this example NewQty is a parameter of the procedure.
-
If they added the ability to provide an alias the ambiguity would be gone. Aliases in SQL are useful and perform a similar function. Shortening repeated references can make code easier to read, the problem is the current WITH creates ambiguity.
A code snipped from the blog post redone with the ability to provide an alias as an example:
procedure TMyForm.UpdateInventoryItem(const NewQty: Integer); begin with dmStoreInventoryData as A do begin with A.tblUpdateItemForStore as B do begin B.Edit; B.FieldByName('Qty').AsInteger := NewQty; B.Post; end; end; end;
-
5
-
-
They are missing in the IDE based GetIt here as well. Other subscription only stuff like FMXLinux 1.78 that got an update around the same time (June 2024) show without issue.
-
FireDac requires client libraries of some form provided by Microsoft to access Microsoft SQL Server. These are not available for Android.
Another set of data access components is SDAC from Devart which has an additional direct access mode that uses TCP/IP directly to access Microsoft SQL Server. Applications using this direct mode can run on platforms for which Microsoft has not provided client libraries.
-
I think those (uses-feature) are just play store hints? The application won't be offered to devices without the uses features that are marked as required. They don't seem to be used by the android loader itself.
Might be the OS is trying to be clever and attempting to pre-load/integrate something related to a uses-feature that then causes issues or a crash.-
1
-
-
Using SQL to query <100k records in a memory table shouldn't be slow on even a 300Mhz Pentium 2 with spinning rust with even a small number of indexes to help.
I wonder what you are doing to make it so slow.
Something like SQLite is well optimized and shouldn't be slow at this, especially if you load the data into in-memory tables and add an index or two.
-
Work on describing the problem. Start with conditions where it occurs, Where does it not occur? Describe "What" the problem is. Develop a small test case or program you can share that reproduces the problem. Reproduce the problem yourself in varied environments.
-
-
A quick search I see that information at codesnip-faq/UsingCodeSnip.md at master · delphidabbler/codesnip-faq · GitHub in part of the answer to
FAQ 3
What changes does CodeSnip make to my system?Quote-
A
%ProgramData%\DelphiDabbler\CodeSnip.4
folder is created. A configuration file is stored in the folder. Once the database is downloaded, its files will be stored in aDatabase
sub-folder (see below). -
A
%AppData%\DelphiDabbler\CodeSnip.4
folder is also created. This is used to hold a file that stores per-user configuration data. AUserDatabase
sub-folder is used to store any user defined snippets. Note: From CodeSnip 4.3.0 the user can change the directory containing the user-defined snippets.
-
-
49 minutes ago, JohnLM said:In XE7, I do not see any place that shows 'fixed set of choices' or a place to enter said choices.
Items.
-
You must manually enter the "fixed set of choices" that populate the list.
Just like an TDBEdit shows one field value from the current record the TDBListBox highlights the value of one field from the current record in the list.
A DBLookupListBox also sources the values for the list from another query / datasource.
-
It shows live data. For ONE field of ONE record (the current record of the dataset) it shows a list of values (from the items property) with the current field value highlighted.
A customer record might have a Country field: hooking it up with the list having values for Canada, USA, Mexico it would highlight the list value matching that of the current record. If the user clicked a different list value, then the field would change value to that.
-
You need to put the list of values to choose from in the list's items property.
QuoteTDBListBox represents a data-aware list box that allows users to change field values by selecting an item from a list.
Use TDBListBox to add a list box to a form that permits users to change the value of a field on the current record to one of a fixed set of choices.
If you want the list of values to come from the database you would use a DBLookupListBox.
-
Python has more bindings and tutorials for stuff like this and can be used from Delphi once you get it working in Python. Retraining an image classification model on the set of cards would be a good start.
Some starting points:
Image Recognition and Classification in Python with TensorFlow and Keras (stackabuse.com)
-
1
-
-
-
The Android version / SDK targeting requirements are a year behind releases. Only on 31 Aug 2024 are new apps and updates required to target Android 14 / API 34 (with extension to November on request). Delphi has often barely made this more relaxed requirement so I wouldn't expect Android 15 / API 35 support anytime soon.
Target API level requirements for Google Play apps - Play Console Help
-
Having the logging expressions compiled and executed on a regular basis means they are less likely to break unnoticed and cause issues when you need them.
Building logging strings is usually a small fraction of execution time so keeping things simple is a valid choice.
-
Not sure what your setup is - what Linux has PAServer on it to run/debug executables written in Delphi? Are you using your Ubuntu 24.04 host?
It is best to use a supported distribution, so Ubuntu 22 or Ubuntu 20.04 LTS if you prefer Ubuntu when debugging.
Supported Target Platforms - RAD Studio (embarcadero.com)
-
-
The DLL it is running, and its location should give some hints as to what it is as will the contents (strings at least) of that DLL. Best to figure out what it is and uninstall or disabled it.
Sometimes software is installed as a device driver, I remember an annoying piece of Lenovo software that was like that.
Other things that can eat a lot of disk IO would be Windows Search indexing.
-
On 7/9/2024 at 12:54 PM, dmitrybv said:Debugging capabilities are already built into the Android operating system.
They are disabled by default on Android devices. You must enable development mode and then also enable USB debugging. Having them enabled has security implications.
-
Another issue is IDE insight is blind to context menu commands. This means things only available in a context menu are harder to find.
-
The person silhouette in the top right, Requests then in the results change the All drop down to Created by me.
-
1
-
Minimum Viable Product (MVP)
in General Help
Posted
The MVP needs to be usable by your early customers that are a subset of what you hope to eventually reach. Figure out who they are, their needs and how you can meet some of those needs with a small, limited feature set.