Jump to content

corneliusdavid

Members
  • Content Count

    620
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by corneliusdavid

  1. corneliusdavid

    AnsiString oddities

    It's been a while since I used C++ but I think you might need to use a StringBuilder class and call methods to concatenate string.
  2. corneliusdavid

    FMX cross platform approach?

    This sounds really slick at first but would this actually work? The base filenames are the same but if you switch the View in the designer and make any change, the Delphi IDE creates a copy of the .fmx file with a different filename for that view in the same folder, so you'd have to constantly be moving those files to their platform folders. Or only looking at certain units in certain views. I agree putting {$IFDEF}s in the .dpr is not only a bad idea but difficult to manage as adding/removing units to the project rewrites it. If sub-forms are loaded and managed from the main form (or somewhere else other than the project) then using {$IFDEF}s in uses clauses isn't so bad--but then you don't have all of the used units listed in the project--which are used by some external tools.
  3. corneliusdavid

    FMX cross platform approach?

    Yes, for database and other non-GUI and platform-agnostic stuff, keep it simple and write a VCL app to build out and test those features, keeping them completely separate. This is an excellent use case for writing event handlers. This is a nice approach--keeps the code cleaner. That's a great idea--use the best controls for each platform. Grids are a lot easier to work with than ListViews but ListViews are better for small devices. The only thing is that as soon as you view a form in the designer using a different platform view, it creates another .fmx file (e.g. .iPhone.fmx, iPhone47in.fmx, iPhone55in.fmx, .LgXhdpiPh.fmx, .Macintosh.fmx, etc.) so then you have to manage those but still, I like the approach.
  4. corneliusdavid

    What is RAD Server?

    @mvanrijnen, no worries, take care of yourself.
  5. corneliusdavid

    What is RAD Server?

    Oh, so you send the username/password in the first API call, get back a session id, then use that for subsequent API calls. And THAT is where the problem occurs, when doing the same thing from a different device and it returns a different session id but you can't use a different session id for the same login.
  6. corneliusdavid

    What is RAD Server?

    That uses the TBackendAuth component, different than simply accessing a custom API endpoint. I've accessed API endpoints using the same login from multiple computers nearly simultaneously. But the authentication component logs in, then you do your user management, then logout--that's a very different scenario, isn't it?
  7. corneliusdavid

    What is RAD Server?

    Admittedly, I've only used it for simple apps to test and understand RAD Server. What you're saying is that each connection must be logged in with a separate user, right? For a per-user license of RAD Server, I guess it's ensuring the license fee won't be abused.
  8. corneliusdavid

    What is RAD Server?

    It's not a web server. It's a REST server that can run stand-alone or through a web server such as IIS or Apache. It provides a framework with user management on a robust and encrypted database onto which you can easily add custom-written API endpoints for REST clients.
  9. corneliusdavid

    FMX cross platform approach?

    If I was starting a new application targeting multiple platforms, I would develop for all platforms simultaneously while building the app. The reason is that different platforms will have slightly different ways of doing things and if you build the app to work well on one platform then address needs of others, it may affect some screen design decisions you would've made differently earlier. For example, iPhones and iPads don't have a back button but Android devices usually do so if you write the app with the assumption of an Android device first and assume everyone will have a back button, your screen may be too cluttered to add a back button later when you add the iOS platform. That's just one simple example and of course you should be aware of platform differences up front (and never make assumptions, etc.). There are many other considerations such as screen size and orientation, which style will you apply for the different platforms and how do all the different edit controls look and feel. All these things have subtle influences on your screen design. It's much easier to make those decisions in the early stages than to then try to morph a feature-complete app for another platform.
  10. corneliusdavid

    What is RAD Server?

    It's a REST server in a box with installations for both Windows and Linux, running stand-alone or under IIS (Windows) or Apache (Linux). You add your own custom services as modules using Delphi or C++Builder. For Linux installations, I know it supports Ubuntu, but you'd have to check with Embarcadero for the latest supported distributions and versions--but yes, it would run under a virtual machine. It also requires at least the Enterprise edition of Delphi, C++Builder, or RAD Studio. https://www.embarcadero.com/products/rad-server
  11. corneliusdavid

    Parnassus Bookmarks for Delphi 11 Alexandria?

    And for the record, I have used some WordStar key combinations, such as Ctrl+K Ctrl+I and Ctrl+K Ctrl+U for indenting and unindenting blocks of code before Tab and Shift+Tab were implemented.
  12. corneliusdavid

    Parnassus Bookmarks for Delphi 11 Alexandria?

    True. If you like those key combinations better than Ctrl+Shift+B and Escape, then I guess you don't need the Parnassus plugins for stack bookmarks.
  13. corneliusdavid

    Parnassus Bookmarks for Delphi 11 Alexandria?

    Yes, Delphi has had Toggle Bookmarks for a long time where you hit Ctrl+Shift+N (where "N" is the number 1..9) for 9 different bookmarks per file. Since Delphi 10.1 Berlin, you can also use stack-based bookmarks but by default, they use a clumsy collection of the old WordStar key combinations I can't remember. The Bookmarks and Navigator plugins add a lot of nice features which make it usable.
  14. corneliusdavid

    ADOTable vs ADOQuery

    Table components will bring back all the fields from each row returned whereas you can limit the number of fields returned with a query. Also, the result set is prepared on the server (using joins and where clauses and such) rather than bringing the data down to the client and then filtering it, so it can be much more efficient, especially noticeable over slow connections.
  15. @Ann Lynnworth, thank you very much for the detailed explanation. That's exactly the information I needed!
  16. corneliusdavid

    Interesting way to copy dynamic arrays.

    Ah! Yes, I see it now! Calling SetLength() is necessary to make it unique!
  17. corneliusdavid

    Interesting way to copy dynamic arrays.

    Isn't B already unique? See the output of my test program--those are distinct arrays.
  18. corneliusdavid

    Interesting way to copy dynamic arrays.

    I just tested this in Delphi 11: program ArrayCopy; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; procedure ShowArray(AnArray: TArray<Integer>); begin Writeln('Length: ' + Length(AnArray).ToString); for var i := 0 to Length(AnArray) - 1 do Writeln('[' + i.ToString + '] = ' + AnArray[i].ToString); end; begin var a, b: TArray<Integer>; a := [1, 2, 3]; ShowArray(a); b := a; b[1] := 12; ShowArray(b); Readln; end. And the output shows SetLength() is not necessary:
  19. corneliusdavid

    Interesting way to copy dynamic arrays.

    That's just as good a question. So either the assignment statement simply copies all elements it knows about in array A without setting the length of B (which seems like an incomplete copy) or setting the length is not needed.
  20. corneliusdavid

    Interesting way to copy dynamic arrays.

    Wouldn't you want to set B's length to Length(A)?
  21. I have a question about one of the survey questions: "Would it suffice to re-index on a schedule such as quarterly, monthly or weekly?" What is the purpose of re-indexing? Is that re-indexing my database with the data? Or something in the Rubicon library/database itself?
  22. corneliusdavid

    How do I develop bluetooth app in RAD Studio 10.4?

    Bluetooth can be separated into two broad categories: Bluetooth Classic and Bluetooth Low-Energy, or BLE. You mention "sensors" so that implies BLE. Here are some links to get you started: Using Bluetooth Low Energy Beacons and Delphi A museum adventure with a Delphi integration Working with ThingConnect Devices (Bluetooth was one of the hardest chapters to write in my recent book, Fearless Cross-Platform Development with Delphi.)
  23. corneliusdavid

    Application to generate all cross platform images

    @KenR, I just downloaded and tried out this program--excellent job! It works great--and will save SO much time!! :-)
  24. I'm using the scButton from StyleControls to pop up a secondary form right next to the button--and it works well. When there are multiple scButtons, I'd like a click on a different button to immediately close an existing form and open the other one just clicked; instead, the first click closes the current form and I have to click again to open the next form--requiring a double-click on the button to open the next form. For example, in the DropDown Forms demo that comes with StyleControls, if I click one of the drop-downs that open up a mini form showing a list of selectable items but before choosing one, click on "scButton2", I don't want to have the first click close the list form and then have to click scButton2 again in order to open its form, I just want to click once and the list will close and the new form immediately pops open. In other words, I want one click on scButton2 to go from here: to here: How do I close the first pop-up form and open the second in one click?
  25. corneliusdavid

    StyleControls: how to single-click 2nd button?

    Thanks for the answers--I appreciate it.
×