Jump to content

Brian Evans

Members
  • Content Count

    397
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Brian Evans

  1. Brian Evans

    Connecting to MS Access (.accdb) in Delphi 12

    The annoyance is Microsoft Office gets installed as EITHER 32-bit or 64-bit and this includes the database access infrastructure for it like the Access ODBC driver. You never get both 32-bit and 64-bit at the same time and installing Office will uninstall the one it doesn't need while installing the one if does need. The Unidac drivers from Devart include a direct mode that doesn't use the ODBC drivers but has some limitations like not supporting DDL statements. This gets around needing a matching 32-bit or 64-bit Access ODBC driver.
  2. Brian Evans

    Delphi apps on ARM CPU?

    Windows phones were for real and some were really good. I still miss them as the Windows 8 tile UI I disliked on the desktop worked great on mobile especially the live tile screen and the application list screen. Didn't save the platform when Microsoft's attention shifted to other things. The YouTube unboxing video linked earlier in the thread is actually for the Intel version of the Surface Pro 11 and is described after some limited testing as the best Surface Pro they have ever used. Not exactly a ringing endorsement of the ARM based ones. Windows 11 on ARM has potential but I think it still needs to show some sustained support and take up before its worth the effort. Bit of a chicken and egg but Delphi has been burned before adding platform support early - Kylix and Delphi.net being two examples that just drained away developer resources and then were abandoned.
  3. Brian Evans

    Delphi apps on ARM CPU?

    Microsoft has done several attempts at Windows on ARM for over a decade and they have all been total failures. Anybody who targeted it ended up wasting a lot of time and money. The most recent effort does have two things previous attempts didn't: full win32 API support and the ability to run x86 binaries. That alleviates the need for application developers to produce ARM binaries until Windows on ARM gains some traction as a platform. Adding support before the platform gains some traction is unwise. We are in fool me once, fool me twice, fool me three times territory for Windows on ARM.
  4. Don't forget the difference between a user trying to get work done in an application vs a developer playing/scrolling around. I find a modern styled application can be easier for a user to read and follow as they work on the content shown in the application. Some appreciate being able to adjust things to their taste - especially older workers desiring larger fonts and more contrast. Users rarely dynamically resize forms these days - either it is full screen or snapped to half a screen or some other region. I have gotten distracted working on things that seemed important - speed while users really wanted predictability. For example a form frozen for 4 seconds feels worse to a user than an active form showing progress that takes 15 seconds. When developing I might scroll through 1000's of records while a user is more likely to search and display 10-100 records and examine them when actually doing work.
  5. Look at the crash details to get hints as to what is going on. Note you didn't post any and "crash" is very little to go on. Guessing it is the CALL that crashes due to the object reference being no longer valid. Perhaps owned objects are getting freed automatically or earlier than before. Not sure which code is yours (if any) so hard to tell.
  6. Brian Evans

    IBX is Crashing Application on Windows XP / Server 2003

    Can check what API calls are being made and if some are failing shortly before the application gives up the ghost. One tool for that is API Monitor by Rohitab Batra http://www.rohitab.com/apimonitor
  7. Note you can access the VCL from another thread in a thread-safe manner using Synchronize (https://docwiki.embarcadero.com/Libraries/Athens/en/System.Classes.TThread.Synchronize) Code inside the Synchronize is run using the main thread.
  8. Brian Evans

    function declarations without ; at the end

    In the full IDE more than just the compiler parses the code and some of the other parsers have been slow, flaky and unreliable for a long time. I don't think allowing and including code like this is helping any.
  9. This seems like adding requirements covering corner cases or minutiae that are unlikely to be meaningful to actual users. Most just dislike doubt and uncertainty - is it still doing anything? did it freeze? How much longer will it take? - provide some indication that answers those questions and most users will be happy. Trying for a precise UI treatment while also not fixing threading in the main application seems like a way to waste a lot of time on a secondary issue - just get the information displayed.
  10. One option: Create another application that shows a loading GIF and occasionally send it messages from your main thread to update/exit/etc. Has drawbacks but disturbs the exiting application the least code and UI wise.
  11. Brian Evans

    Delphi 12.3 is available

    Two of the big ones - Microsoft SQL Server and Oracle - still provide and support 32-bit clients. The databases with per server and/or per client license fees have more resources and incentives to keep that support going.
  12. Brian Evans

    VCL spinner

    An elapsed time clock is another option. If the time taken has some predictability users tend to like this option - over time they get a feel for how long some tasks take and if they can grab a quick coffee etc. In the Delphi 7 days I used a component from the Developer Express Forum Library for this but they stopped maintaining it a long time ago.
  13. Brian Evans

    FireDAC MySQL Driver Not Working

    There is a 32 bit ODBC driver, currently it is: Connector/ODBC 8.0.40. (select version 8.0.x in the list here: https://dev.mysql.com/downloads/connector/odbc/ ) It does mean using the FireDac ODBC driver to then use the MySQL ODBC driver vs going more directly.
  14. Brian Evans

    How to NOT save changes when compiling?

    Note "IDE Insight", a search box on the right of the title IDE Window's title bar can be used to search for settings. Once you remember it exists finding settings is usually much faster than manually going through the settings dialogs.
  15. Could be some piece of software or the display driver. Hard to say without more details of the system. The contents of the Display tab of dxdiag might help. Also check for any tray icons or software running in the background with % GPU (CTRL-SHIFT-ESC, Processes, right click column headers and turn on GPU engine column).
  16. How about fully logging/signing out then back in (so it resets the Window session)? Very odd such basic functionality is failing.
  17. Instead of rebooting try Win+Ctrl+Shift+B shortcut to reset/restart the graphics driver. Not a solution but might point to what is causing problems.
  18. Brian Evans

    SQLite and calculated columns

    Outside of the recently (relatively anyway) introduced STRICT tables the type of a column is really just a suggestion and it will happily stick a string anywhere if asked. Most tools try to tame this by enforcing the type but don't always succeed. SQLite website: 1. Datatypes In SQLite Most SQL database engines (every SQL database engine other than SQLite, as far as we know) uses static, rigid typing. With static typing, the datatype of a value is determined by its container - the particular column in which the value is stored. SQLite uses a more general dynamic type system. In SQLite, the datatype of a value is associated with the value itself, not with its container. The dynamic type system of SQLite is backwards compatible with the more common static type systems of other database engines in the sense that SQL statements that work on statically typed databases work the same way in SQLite. However, the dynamic typing in SQLite allows it to do things which are not possible in traditional rigidly typed databases. Flexible typing is a feature of SQLite, not a bug. Update: As of version 3.37.0 (2021-11-27), SQLite provides STRICT tables that do rigid type enforcement, for developers who prefer that kind of thing.
  19. Brian Evans

    SQLite and calculated columns

    The type-less nature of SQLite makes it not ideal for data in transit between databases. You end up doing work for edge cases that a typed database would handle on it's own. Want real fun? Have both English and French users, like in Canada with it's two official languages, where the decimal separator is period and comma respectively. Soon as strings start appearing in a column storing transaction values the fun begins. It can work as long as you listen to Egon Spengler and never cross the streams. Soon as you do however ...... think an online store that occasionally gives out 99.9% discounts level bad (few would complete the reverse - an order with items having a 1000x price increase except maybe the government).
  20. No solution but some thoughts. FMX forms use GPU resources including when designing in the IDE which is not the case for most VCL forms/components. Perhaps re-install / upgrade to the latest graphics drivers with whatever 'clean install' option is available selected in the installer.
  21. Brian Evans

    TListView - manually adding items faster at runtime

    As well a lot of controls with lists have a BeginUpdate and EndUpdate so you can stop visually updating the control for every change to an item. Wrap things in an Try/Finally to make sure EndUpdate is always called. lv1.items.BeginUpdate; try // add multiple items finally lv1.items.EndUpdate; end; From the help for Vcl.ComCtrls.TListItems.BeginUpdate : Prevents updating of the list view until the EndUpdate method is called. Call BeginUpdate before making multiple changes to the list of items. When all changes are complete, call EndUpdate so that the changes can be reflected on screen. BeginUpdate and EndUpdate prevent excessive redraws and speed processing time when new items are added, deleted, or inserted.
  22. Brian Evans

    Multiple similar components

    As Remy already mentioned an array or list works. I tend to put such things in a dynamic array. Can move the array to someplace higher in scope if desired but for code that doesn't run that often I usually create it as needed and let it fall out of scope and be destroyed. procedure TForm1.Button1Click(Sender: TObject); Var SomeMemos : array of TMemo; begin SomeMemos := [Form1.Memo1,Form1.Memo2,Form1.Memo3,Form1.Memo4,Form1.Memo5]; // Dynamic Arrays are zero based so need to subtract one compared to 1 based SomeMemos[5 -1].Lines.Add('test!'); end;
  23. In general an ever growing queue is a bad thing - at some point adding new items has to at least pause or it grows unbounded. The default size in the .create is a bit on the low side at 10 which I think is a source of bugs. This parameter perhaps should not have a default forcing the developer to think of a sane value or the need to .grow(). The defaults for create(): AQueueDepth is the length of the queue, which is by default set to 10. PushTimeout is the timeout when a new element is pushed, which is by default set to INFINITE. PopTimeout is the timeout when a new element is popped, which is by default set to INFINITE.
  24. Sure you don't have the options reversed between debug/release? The processor might be making poor choices in where it sends instructions but it would be odd to see a couple more instructions execute faster even with poor choice of execution unit scheduling or register usage. The only difference I see is the default debug settings generate code that does range bounds checking on a[i] checking it is within the array bounds. -- range and bounds checking off Project1.dpr.51: DivandMod(a[i], 2039, resto); 000000000036CB5E 488B05834B0300 mov rax,[rel $00034b83] 000000000036CB65 8B0D594B0300 mov ecx,[rel $00034b59] 000000000036CB6B 8B0C88 mov ecx,[rax+rcx*4] 000000000036CB6E BAF7070000 mov edx,$000007f7 000000000036CB73 4C8D05764B0300 lea r8,[rel $00034b76] 000000000036CB7A E881FEFFFF call DivandMod -- range and bounds checking on Project1.dpr.51: DivandMod(a[i], 2039, resto); 000000000036CB83 8B053B4B0300 mov eax,[rel $00034b3b] 000000000036CB89 48833D574B030000 cmp qword ptr [rel $00034b57],$00 000000000036CB91 740D jz Project1 + $150 000000000036CB93 488B0D4E4B0300 mov rcx,[rel $00034b4e] 000000000036CB9A 483B41F8 cmp rax,[rcx-$08] 000000000036CB9E 7205 jb Project1 + $155 000000000036CBA0 E8BBFFECFF call @BoundErr 000000000036CBA5 488B0D3C4B0300 mov rcx,[rel $00034b3c] 000000000036CBAC 8B0C81 mov ecx,[rcx+rax*4] 000000000036CBAF BAF7070000 mov edx,$000007f7 000000000036CBB4 4C8D05354B0300 lea r8,[rel $00034b35] 000000000036CBBB E840FEFFFF call DivandMod
  25. Brian Evans

    Problem to save XLSX file with QuickReport

    Check whatever component/library you are using to add export to xlsx capability to QuickReport. Update: Seems they added it at some point.
×