Jump to content

corneliusdavid

Members
  • Content Count

    408
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by corneliusdavid

  1. corneliusdavid

    Interesting way to copy dynamic arrays.

    Isn't B already unique? See the output of my test program--those are distinct arrays.
  2. 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:
  3. 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.
  4. corneliusdavid

    Interesting way to copy dynamic arrays.

    Wouldn't you want to set B's length to Length(A)?
  5. 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?
  6. 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.)
  7. 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!! :-)
  8. 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?
  9. corneliusdavid

    StyleControls: how to single-click 2nd button?

    Thanks for the answers--I appreciate it.
  10. corneliusdavid

    A way to collapse Defines in the IDE??

    Well, you could put the code you want collapsed in a {$REGION} because regions are collapsible. But that's a lot of extra work--and more lines of code.
  11. corneliusdavid

    Cannot build iOS 15.1 apps

    This has been fixed in today's patch ... https://blogs.embarcadero.com/rad-studio-11-alexandria-november-patch-available/ Now, I can resume iOS development--and will remember not to upgrade quite so quickly in the future!
  12. corneliusdavid

    Delphi/FireDAC and Firebird 4

    It takes some time to play around with it and get familiar with resources and suffixes. We could start a new topic to discuss this if you want.
  13. corneliusdavid

    Delphi/FireDAC and Firebird 4

    Thanks for your comments--so glad it was useful!
  14. corneliusdavid

    Delphi/FireDAC and Firebird 4

    Well, yes, I was surprised how many of those comments came through. In my recollection, most of those were near the beginning of the session. But consider this, too: responding with a quick smiley-face or one word response (e.g. "Agree!") takes far less time and effort than doing research on a question you may not know for sure. People take what is said in these sessions as gospel so the answerer needs to be certain what they're saying is spot-on.
  15. corneliusdavid

    Delphi/FireDAC and Firebird 4

    I think they were fielding questions as fast as they could but could only get to so many. It went over time as it was. I've been on that side of the screen and you just can't get to everyone's question or comment.
  16. corneliusdavid

    Bookmarks dead?

    The REST Debugger is definitely convenient--especially with the Copy Components button--but it is buggy and sometimes I have to restart that as well. I use bookmark stacks and the code mini map far more often, and in more projects, than the REST Debugger. Getting those back in the next month would make a nice Christmas present!
  17. corneliusdavid

    Bookmarks dead?

    I guess I just have seen so many negative comments on these forums and I just had seen one too many. The Embarcadero of today is a long way from the Borland of yesterday; today's companies seem much more focused on profits than community. I remember the CompuServe days, the flame wars on newsgroups, and being able to connect directly with TeamB. Perhaps this is the last place to collectively vent. Still, it seems that comments are too often directed at programmers that don't likely have much control over their priority list. We can only hope that our frustration is heard up the chain of command. The Bookmarks and Navigator plugins are my favorite additions to Delphi--I've blogged about it recently. I too am waiting and hoping for an update.
  18. corneliusdavid

    Bookmarks dead?

    It never ceases to amaze me how people in these forums can have such deep and intimate knowledge of the code of the IDE and it's plugins and libraries that they feel they have the right to highly criticize the hard-working team behind the complex and powerful development tools we use. As an independent programmer, I can set my own deadlines--and I don't release anything until I'm sure it's ready. When I worked for a large corporation, executives that have to please shareholders are the ones that set deadlines--and whatever code was ready, was released. I'm sure the Delphi team would've loved to postpone the release of D11 until it was more fully tested and all the plugins were finished to be released along with them but I'm also fairly certain they didn't have a choice and are also not allowed to voice those internal issues. Personally, I feel sorry for them and the pressure they must be under, especially when they read these posts and can't do a single thing about it.
  19. corneliusdavid

    Cannot build iOS 15.1 apps

    I've tried that. I removed the iOS platform from Delphi, deleted the folders, did a total clean of the project (and also tried a brand new project), re-added the platform which re-added the SDK folders... Still got same linker error. So this is a problem with Monterey? Doesn't Delphi import the libraries and frameworks from Xcode? I can build a bare-bones Xcode project on Monterey to my iPhone.
  20. corneliusdavid

    Android project deployment messed up

    I have two different, very simple, cross-platform projects I'm using for development testing, one works fine, the other used to but is now getting a strange error when I try to deploy it to my Android device: The project that deploys fine has the same base project filename as the folder in which it resides. The second project (the one with the problem), DelphiVersions, is one of several projects in a folder, each project's name is appended with the type of platform it's for. The folder name is V:\DelphiVersions and I have DelphiVersionsConsole, DelphiVersionsVCL, and DelphiVersionsMobile in that folder. The last one, of course, uses FireMonkey, and is deployed to Android and iOS. I'm using Delphi 10.4 and had this working a few months ago but since Android 11 and API 30 was released I wanted to have more direct control over where and which SDK was installed and found this excellent blog that helped me get there. This also meant I switched to using OpenJDK and changed the location of the SDK and tools. Should still be good, right? As I examined the project trying to figure this out, I deleted temporary files, even removed Android support from the project and re-added it, and checked a few other things. The only thing I can think of that is different where deployment is concerned, is that the DelphiVersions one has "Mobile" appended to the end of the project name and one of the build tools must assume the project name is the same as the folder name. The obvious thing to try is rename the project to just DelphiVersions to match the folder name--I did that but it gave a similar error, this time with the path "V:\DelphiVersions\bin\DelphiVersions.apk" not found. So mismatched project name is not the source of the problem. Another thing to note is that I have projects for several versions of Delphi in sub folders and for Delphi 10.4 it's in a "104Sydney" folder and it actually generates "V:\DelphiVersions\104Sydney\DelphiVersionsMobile\bin\DelphiVersionsMobile.apk" (the file is actually where it should be!). I also looked at the deployment file list and the manifest file--still no clue. Why is the deployment process removing the first two sub-levels of folders in the filename?
  21. corneliusdavid

    Android project deployment messed up

    I decided to move up to Delphi 11 and just use their default platform installer for Android. I also decided to retire the old Android ZTE phone. I'm able to compile, debug, and run both Android and iOS apps from Delphi 11 now. I was still getting the weird error listed in my previous post for the DelphiVersions project though, even after deleting all temporary files and recompiling. Finally, I just renamed the project to DelphiVersionsMobileBroken, created a new blank mobile app, added the forms, removed the default form, set up the icons and version info--and it works! Something was seriously amiss--but everything is back working now--and in Delphi 11. Whew!
  22. corneliusdavid

    Android project deployment messed up

    Back to the DelphiVersions project, I deleted all temporary files, even including the .dproj, .deployproj, and .res files and opened the project back up, reset some simple version info and rebuilt (still using Delphi 10.4). Now, it's not even getting to the deploy stage because it can't finish building the package, giving me this error: "Resource package cannot be an empty string (at 'src' with value '@drawable/splash_image')" and references the file, splash_image_def.xml. But looking more carefully at Delphi build output, I think one of the SDK tools is configured incorrectly: [PAClient Error] Error: E2312 Unable to execute '"C:\Users\Public\Documents\Embarcadero\Studio\AndroidSDK\build-tools\30.0.3\aapt.exe" package -f -M "V:\DelphiVersions\104Sydney\DelphiVersionsMobile\AndroidManifest.xml" -F "V:\DelphiVersions\104Sydney\DelphiVersionsMobile\bin\DelphiVersionsMobile-unsigned.apk" -I "C:\Users\Public\Documents\Embarcadero\Studio\AndroidSDK\platforms\android-30\android.jar" -S "V:\DelphiVersions\104Sydney\DelphiVersionsMobile\res" -A "V:\DelphiVersions\104Sydney\DelphiVersionsMobile\assets" "V:\DelphiVersions\104Sydney\DelphiVersionsMobile\library" "V:\DelphiVersions\104Sydney\DelphiVersionsMobile\classes"' (Error 1) Maybe I should reinstall Delphi 10.4's Android development.
  23. corneliusdavid

    Android project deployment messed up

    I was testing on an old ZTE with Android 7.1.1. I switched over to my Google Pixel with Android 11 and can debug just fine now--thanks!
  24. corneliusdavid

    Android project deployment messed up

    The Output Directory for the project is blank for all targets, so it should just be going to the default folder--and indeed the .apk file is generated in the folder I would expect: V:\DelphiVersions\104Sydney\DelphiVersionsMobile\bin. I added a new FM project to the project group and it deployed to my Android device and ran. I can't debug it because it gets an error: "tcp:64311: cannot resolve name: No address associated with hostname" but I can run without debugging--I had noticed that error with other Android projects as well. That's a separate problem but it bothers me and I'd like to get that resolved as well.
  25. corneliusdavid

    Strategies for minimizing app start time

    I read an article years ago about how office workers complained of the slow speed of elevators in a tall building, especially at 8:00 in the morning when everyone was arriving for work. Without changing anything with the elevators at all, the building owners simply installed big mirrors in the lobby and the complaints nearly stopped. A lot of times, it's just a distraction that is needed or visual activity which gives the impatient user a feeling like there's something going on and significantly reduces the stress of waiting.
×