Jump to content

Brian Evans

Members
  • Content Count

    294
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Brian Evans

  1. Would also add that here in the default Debug configuration I get a warning plus the same error for each out of range value and not all the odd errors seen in Release. [dcc32 Warning] Unit1.pas(40): W1012 Constant expression violates subrange bounds [dcc32 Error] Unit1.pas(40): E2026 Constant expression expected [dcc32 Warning] Unit1.pas(40): W1012 Constant expression violates subrange bounds [dcc32 Error] Unit1.pas(40): E2026 Constant expression expected Also Release does also get the same Warnings along with the odd errors. [dcc32 Warning] Unit1.pas(40): W1012 Constant expression violates subrange bounds [dcc32 Warning] Unit1.pas(40): W1012 Constant expression violates subrange bounds [dcc32 Error] Unit1.pas(40): E2011 Low bound exceeds high bound
  2. The help does mention the selector expression is limited to 32 bit ordinal values and case values must match that type. Declarations and Statements (Delphi) - RAD Studio (embarcadero.com) So it looks like case expression (Z in your test) is being evaluated/converted into an Int32 and the case values that can't also be converted produce errors.
  3. You can run/debug multiple executables in a project group at the same time. Build all the project group (you can't compile one while the other is running) then run each in turn. A quick test has a local Windows 64 bit app window and one on Linux VM.
  4. Brian Evans

    Conditional compiling - Delphi has a bug

    The help for the IF directive gives an example of such a construct all on one line instead of split into two IF's. I would suggest trying it that way as it seems to not like just the number check on it's own. IF directive (Delphi) - RAD Studio (embarcadero.com) : {$IF Declared(FireMonkeyVersion) and (FireMonkeyVersion > 16.0)} ... {$IFEND}
  5. Brian Evans

    Community Edition expiring again, no new keys

    Delphi licensing still follows the decades old model of editions with feature bands at fixed costs + a free version designed to drive sales quickly. Some other companies have successful products with licensing that more directly targets different types of users in more situations growing both the community and revenue. Two examples I am familiar with are Wolfram Mathematica and JetBrains Webstorm. The first has a home edition for a fraction of the price of the full product and the second has a personal / business license split where personal licenses are cheaper vs those purchased or reimbursed by a company. Both manage to capture users and revenue without making the products free or dividing the user base. A lot of such users might never transition to the full ticket products but at least they become users and provide some revenue. Wolfram Mathematica standard desktop : $3,130 or $1,570/year vs Home edition desktop : $376 or $188/year Jetbrains Webstorm: $129 first year for organizations, $59 first year for individuals (for both it goes down for the 2nd and 3rd years) I don't use Mathematica for work (just for curiosity and math/science interests) so would never foot the full price. For Webstorm I bought a non-reimbursed personal license to use at work. In both situations if it was Delphi I would not have made any purchase instead using either the CE or nothing.
  6. Brian Evans

    Community Edition expiring again, no new keys

    I am a Delphi Enterprise user myself. My concern is over the effect poor licensing practices have on the wider Delphi community. Free but you may not be able to use it sometimes burns off some of the goodwill generated from having a community edition for no gain.
  7. Brian Evans

    Community Edition expiring again, no new keys

    Calling it a glitch was everybody being polite. Do you really want to hear the non-polite version(s)?
  8. Brian Evans

    Clientdataset's delta becomes empty

    I don't use Firebird so was not able to debug your project and reproduce the problem. Some guesses like qGoods being OnDemand and 50 record fetch size vs loading all but without being able to debug they are shots in the dark.
  9. Brian Evans

    Clientdataset's delta becomes empty

    I would suggest switching to using cached updates on the TFDQuery instead of using ClientDataSet. https://docwiki.embarcadero.com/RADStudio/Sydney/en/Caching_Updates_(FireDAC)
  10. I think you would benefit from taking a break and acquiring some Delphi custom component development and debugging skills. Impatience to do something when you have not yet acquired the necessary skills and knowledge usually leads to frustration. The basics of component development and debugging have not changed much so even older books/guides are still useful. Ray Konopka wrote some early books on Delphi component development any which would be a good resource if you can get your hands on one.
  11. You can compress floating values in a small range into an integer evenly. AnInteger = N - RangeStart * (IntegerRange / (RangeEnd - RangeStart)) N = (AnInteger / (IntegerRange / (RangeEnd - RangeStart))) + RangeStart For two byte unsigned integers this only gives ~344 divisions between the whole numbers in your 30-220 range so not quite 3 decimal places.
  12. Brian Evans

    Is it Omni question ?

    Your problem. Exception objects are not thread safe so accessing them from two different threads when one is about to destroy it anyway is never going to end well. Also it is totally pointless - any threading so writes don't block should be done in the logging library itself not every place that logs something.
  13. Brian Evans

    FireDAC open error

    The error message shows a colon at the start of the path\file. ":C:\Prog2\employee.fdb" Your code shows signs of leftovers from trying different things. Make a NEW project and get a connection working with as little as possible. Once done clean up the old code to match.
  14. Brian Evans

    FireDAC open error

    The file has a definition of EMPLOYEE not C:\Prog2\employee.fdb. What is the definition/settings for Convert.FDConnection1?
  15. Brian Evans

    64 bit shift operations?

    Type the constant by replacing 1 with UInt64(1) in your bit() function. Works in 32 and 64 bit targets. Result := ((Uint64(1) shl idx) and value) <> 0; The reason is bit shifts are modulo the size of the type of the arguments. So no error and you get short shifted when one argument is 32 bits which is the default for integer constants.
  16. Brian Evans

    rubicon 4

    Basically it provides database neutral full text indexing to Delphi database applications and comes with components and examples to make it easier. I used Rubicon over a decade ago at work. Was fast and easy to use back then and I imagine it still is. They have a web site that allows searching of Delphi related newsgroups as a demonstration (Code News Fast: Search Delphi and CPPBuilder Newsgroups).
  17. Brian Evans

    FMX Linux console app - Unable to init server

    If you want a console application then create a console application. Not sure the reason behind this statement - what does it matter what else is using a DLL/library?
  18. There is some code / interfaces in Macapi.foundation including one for NSFileManager, at least in Delphi 11.1. Used by TPath.InternalGetMACOSPath in System.IOUtils when {$IFDEF MACOS} which you can look at to get some ideas at least.
  19. There certainly was GetBookmark/GotoBookMark()/FreeBookMark() in Delphi 1. Attached is an image of the Delphi 1 help topic for GetBookmark, notice what the "Note:" at the bottom says:
  20. Brian Evans

    Deployment Android apk

    Did you notice the target shown as assets\internal in the help section linked? Try it with just what the help suggests to start with. Usually prefer .\ vs an empty directory string as well.
  21. Brian Evans

    Do you need an ARM64 compiler for Windows?

    Microsoft has in the past put large amounts of resources into the 'next big thing' followed by it being abandoned. Chasing them is a path to ruin for any smaller companies. Even good products get poor support when they decide to chase something else. Windows Phone 7, 8 and 10, and Windows RT all on ARM and all now deprecated dead ends for example. Or the whole UWP / UWA mess where it seems to be on the way out then comes back. Not a very stable base for third party support. Not sure it is worth chasing ARM64 yet.
  22. Brian Evans

    Interbase VAR Licence and Demos or Free Versions

    Gave up on this decades ago and used FlashFiler then NexusDB instead. Mainly for the ease of going from single user embedded to multi-user client/server without licensing issues. Note for single user applications higher editions of Delphi come with redistribution rights for IBLite and IBToGo. It's only multiuser that needs server licensing that can cause issues for some sales models like yours.
  23. Brian Evans

    Amazon Linux 2

    I would not have PAServer accessible on a public IP. Since you are already connecting by SSH I would suggest a SSH tunnel which redirects a local port to a remote port over a SSH connection.
  24. Brian Evans

    problem upgrading to Delphi 11.1 Patch 1

    The zip file came from another computer (the Internet) and is probably marked as such. Perhaps some copied files are getting the flag set in some circumstances? Try checking the unblock checkbox before extracting/copying.
  25. Brian Evans

    sqlmemtable

    FireDac has Local SQL (FDLocalSQL) which can be used to run SQL against TDataSets. Uses SQLite underneath the hood with some extra bits. Using with some FDMemTable components would keep it all in memory. Local SQL (FireDAC) - RAD Studio (embarcadero.com)
×