Jump to content

JohnLM

Members
  • Content Count

    288
  • Joined

  • Last visited

Everything posted by JohnLM

  1. JohnLM

    Multi-Threading Example Code

    I am not a Thread guru, though I do browse around as it is something I want to learn eventually. So I tried the code snippet in XE7, but didn't work at first, then took out the "@" (before reading Remy's reply) and although the routine appeared to work, the Label did not get updated. And after looking through the code, I saw that var x was never called/assigned. Then I added x=i and it worked! The Lable now gets updated in real-time, even while dragging the form around the screen during the thread's operation. // Simulate some work by looping and sleeping for i := 1 to 1000 do begin Sleep(10); // Simulate work (1 second per iteration) msg := '# ' + IntToStr(i); x:=i; Synchronize(UpdateUI); // Update UI safely from the main thread end; PS: I made a VCL project.
  2. JohnLM

    Delphi 12.2 TMEMO - indexoutofbounds

    I use the TMemo in Android apps a lot, but due to this issue (I suffer from this as well--Galaxy S10+ phone) I've been holding off compiling to Android via 12.2 Does the Inline Patch 1 from 10-17-2024 fix this issue ? As soon as I can, I will be making an HDD image before I proceed to this Inline Patch 1 process.
  3. As the subject implies, I am just messing around with code snippets found on the web. Some I downloaded from people writing code for various purposes. Anyway... So I have this code snippet that I downloaded and was trying to see what happens. The snippet has the line: IdTCPClient1.writeln('start'); and in another: listbox1.item.add(IdTCPClient1.readln); These two commands do not appear in Indy 10.x for XE7 and D12.2 versions. Have those commands been moved some place else in the IdTCPClient component and where?
  4. Thanks. I think this one works better and a faster response time (searches/lookup etc): One of those files, a .zip of the HTML Help, has been uploaded to this repository.
  5. Because I don't know what version the code snips are until later on in reading the entire discussion. These are google search results. I see a snippet and read what's going on. I try it and see if it works on my main laptop computer which has XE7. And if it doesn't work either I'll keep reading further or try it on Delphi 11.2 or 12.2 as those are the three versions I have. But not all google-found search results include the versions of Indy in those discussions. I am just searching google for info and if code snippets are given I try them out for fun or interest. Not all say the version of Indy, and if I can't find any further info to resolve any issues that I might run into while trying those snippets then I might post a question here on Praxis, or not, and move on. Delphi is my hobby. Sometimes I get *new* ideas from these random google searches and they become hobby projects. In fact, I just started a new project from this as of yesterday, a Client/Server app and it appears to be working okay. First time I ever accomplished this as I always wanted to get a client/server (send/receive text) project working via Indy but failed many times. But not this time. But is it perfect or correct? Probably not. But it works. :) I was meaning to post a few questions because I had many issues, about 18 or more hours worth (I just could not stop). I'm stuck on an issue or two and still working them out. Maybe I'll post a question or two later, if I can't figure it out as it is driving me nuts. Also, I have searched around on all my versions of Delphi (xe7, 11.2 and 12.2) and did not see any documentation or Samples folder for Indy. And the link in the About of the Indy components (when you rightl-click the component in the IDE) do not work on any of those Delphi versions.
  6. JohnLM

    Scroll an image with mouse (Solved)

    I am having trouble figuring this one out. I have a form with a tscrollbox and an timage. In the image1MouseMove event of the timage I have the following code; procedure TForm2.im1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin scrollbox1.vertScrollBar.Position := x; scrollbox1.horzScrollBar.Position := y; end; But it is not what I'd expect. What I am trying to do: 1. Lets say I have screenshot of my desktop and inserted into the timage. 2. And I resize the app's form smaller 3. Using the mouse, I want to click on the image and drag (or pan) around inside the form's scrollbox area so that I can see other parts of the image. What am I doing wrong and how can I fix this? TIA
  7. JohnLM

    Scroll an image with mouse (Solved)

    Thank you @Lajos Juhász for your suggestion. I had tried a few mods late last night but I could not get it to work any better. And thank you @Anders Melander for your suggestion. It is working the way I was hoping. And, I learned a little bit about Delta. Thank you both for your help, it is appreciated!
  8. Specs: Win10, Delphi 12.2 - Installing fresh because previous 12.2 installation did not include Android support. 2nd fresh install, same issue. I've reinstalled 12.2 but have no android support and when I plug the usb cable in, there is no device -- field is blank. Okay, so for sure, I thought I would not have this issue this time around in this latest release, but disappointed that this continues every new version install. What can I do? Please advise.
  9. Update. . . Success and Resolved. Thank you @Z Vadim for the solution. In order to work, I had to search for the "sdkmanager.bat" file and found here: C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\AndroidSDK-2525-23.0.53571.9782\cmdline-tools\11.0\bin\sdkmanager.bat I closed down Delphi 12.2, and made sure I was connected to the internet, and went to that folder and ran the following: sdkmanager.bat "platform-tools" "platforms;android-34" I now have moble development working for Android for the first time in the 12.2 version.
  10. Specs: win10 tablet I am unable to install 12.2 It removed 12.0 but the installation stops at: Platforms availability No more platforms pending to install. Any suggestions?
  11. At the start of the installation is a [Options] button for changing folder locations. And I was trying to install to another drive instead of the standard C: drive. It did not like it, I guess. When I changed it to the default location, the installation went ahead, successfully, about 50 minutes.
  12. Issue is resolved and installation is now continuing.
  13. JohnLM

    Delphi 12.2 available for download

    Because I have a small, 128GB hdd in my tablet, I want to install on an external SSD drive. What are the pros and cons for installing on another drive?
  14. License Specs: Delphi 11.2 Alexandria 11/2022 I finally and recently purchased a 1-yr 'support renewal', which ends nov/2024 so that I could get the 12.2 version. However, I have not received any email confirmation with the new license/serials, and I don't see any updates to my https://my.embarcadero.com/ account. It is the same listing since 11/2022. And when I tried to download the 12.2 iso it said that my update subscription expired and to request a renewal quote. The one I recently purchased was this one: "Delphi Professional - Named - Support Renewal" But I do see there are others mentioned here on these forums: * maintenance update -- * update subscription - - * support renewal -- the one I purchased. Did I purchase the wrong one?
  15. Current Specs: Delphi XE7, vcl, win7 and MD5 checksum decoding Update. . . on other news.. regarding the MD5 checksum number given at the download page. I spent hours trying to find out how to do MD5 encode/decode, and finally found the answer I was looking for. I found this routine that worked in XE7 at least, but not tested for other versions old or newer. When run and fed the filename, it took several minutes to process and complete. Happy to say that the checksum produced from the routine below matched the website's !! I hope this code-snippet below, becomes useful for other users. ///// 5a // link; https://stackoverflow.com/questions/447985/file-md5-checksum 9.13.24.fri.0614pm // function MD5File(const FileName: string): string; var IdMD5: TIdHashMessageDigest5; FS: TFileStream; begin IdMD5 := TIdHashMessageDigest5.Create; FS := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite); try Result := IdMD5.HashStreamAsHex(FS) finally FS.Free; IdMD5.Free; end; end; ///// - end 5a -- this compiles successfully. procedure TForm1.Button1Click(Sender: TObject); var hash: string; begin // 5a -- "F:\Delphi\Embarcadero\RADStudio_12_2_9782_9961F.iso" hash := md5file(edit1.Text); edit1.Text := hash; end;
  16. Update. . . Success! I made contact with my sales rep and I am now able to download the 12.2 iso.
  17. Specs: Delphi XE7, 11 and 12, VCL, Win7/10 I work mainly on my win7 latop. And there is this file that I check for stats purpsoes every day and throughout the day as I am working on the laptop. And in one instance today, it dawned on me that I need to know if I was connected to the internet or not. Plus, a side bonus could be helpful to know that if I lose internet I could do something about it. In win7 I noticed that in the bottom task tray area, there is the icon, the one with the square monitor looking image (sure its different in win10), when I hover the mouse over it or click on it, it will say, "Internet access" Is there some delphi code-snippet already out there that will tell me that I am connected to the internet, like in the above mentioned?
  18. Specs: Delphi XE7, FMX, Win7, Win10, - Creating an App Tethering app for each platform (windows/android/tablet/laptop) I've had my share of problems in this app tethering endeavor but over-come most, if not all of them. In this latest issue I appear to have found a slight bug in the differences between Delphi XE7 and Delphi 12 (and I'm sure in previous version as well). Let me explain. 1. I have several demo app tethering that I created in Delphi XE7 for a windows 7 laptop and android 12 phone, and they work fine. I can send/receive text. 2. I have also create demo apps for app tethering in Delphi 11.2/12.0 for a windows 10 tablet and laptop, and they work fine. I can send/receive text. 3. The problem arrises when I create the same project in XE7, and using the same setup I would in the other app tethering (Password, Resource->Kind=value, Resource->Name=text, ResType=data) but that the send and receive app(s) do not find each other. So, the XE7 app tether cannot find that D11 or D12 app tethering and vise-versa. I need to create certain apps under XE7 for my daily windows 7 laptop because this is my main working computer. My other win10 tablet and laptop(s) are my secondary work devices. My question is, is there a work-around for this?
  19. Update. . . I can confirm that the above issue is true. Creating the 'app tether' send/recieve app: 1. If I create the apps on my main laptop using Delphi XE7 and the same ones on another device with Delphi 12.0, and then run both apps, they will not connect. But I found a work-around. 2. If I create the apps in Delphi XE7, and copy all the apps to all machines, laptops, and devices, then they will all connect.
  20. Specs: Delphi XE7, FMX, Win7, Galaxy s10+ phone Android 12. I've have compile and deployed many apps over to my Android 12 device, galaxy s10+ phone. Earlier this year (2024) I stopped working on those projects I used to compile in this setup/specs (listed above). Today, I am trying to deploy an app and now I can not because of the 'Unsafe app blocked message'. I recall seeing something similar in late Dec/2023 on this phone, but there was a button to allow or not, and now I don't see that on this message screen given on my phone. How can I resolve this?
  21. JohnLM

    Receiving an 'Unsafe app blocked' message

    Success!! Okay. I figured out what was causing the problem. I need new glasses. I could not see the part about the link and clicked "Got it" which does not install. 1. So, I deleted the Android folder from the project folder. 2. Then, I restored a backup copy of the origianl unaltered "AndroidManifest.template.xml" file. 3. Compiled/deployed to android. 4. when a "Unsafe app blocked' message appears on the android phone, just above the large blue "Got it" button, click the "More details" link. 5. when you see additional details display, click on the "Install anyway" link. 6. enter your phones sign-on password 7. a dialog of security questions will appear, I just click the Continue button, bottom right. 8. another dialog box pops up for "look for updates.." and "ok". select OK button. 9. app will now load up. -- finished
  22. JohnLM

    Receiving an 'Unsafe app blocked' message

    Make me wish there was a Windows Phone.
  23. JohnLM

    Receiving an 'Unsafe app blocked' message

    I started a new FMX project for android. I only added an edit box. I did not change the template xml file. I left it alone. Then I build it, and that was a success. Then, I compiled/deployed to android. Result: same issue as in post #8 above. I just don't understand it. This was working fine before, back in Dec/2023. And now I can't even compile a small editbox over to android. So frustrating. 😞
  24. JohnLM

    Receiving an 'Unsafe app blocked' message

    post #8 I believe I am doing things correctly now. However, it is not working yet. See below for the XML file that I modified for Delphi XE7, and where I replaced the var android:targetSdkVersion="%targetSdkVersion%" with android:targetSdkVersion="31". <?xml version="1.0" encoding="utf-8"?> <!-- BEGIN_INCLUDE(manifest) --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="%package%" android:versionCode="%versionCode%" android:versionName="%versionName%"> <!-- This is the platform API where NativeActivity was introduced. --> <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="31" /> <%uses-permission%> <application android:persistent="%persistent%" android:restoreAnyVersion="%restoreAnyVersion%" android:label="%label%" android:installLocation="%installLocation%" android:debuggable="%debuggable%" android:largeHeap="%largeHeap%" android:icon="%icon%" android:theme="%theme%" android:hardwareAccelerated="%hardwareAccelerated%"> <!-- Our activity is a subclass of the built-in NativeActivity framework class. This will take care of integrating with our NDK code. --> <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity" android:label="%activityLabel%" android:configChanges="orientation|keyboardHidden" android:launchMode="singleTask"> <!-- Tell NativeActivity the name of our .so --> <meta-data android:name="android.app.lib_name" android:value="%libNameValue%" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <%activity%> <receiver android:name="com.embarcadero.firemonkey.notifications.FMXNotificationAlarm" /> <%receivers%> </application> </manifest> ...and when I compile/deploy to Android, it stops at this part: ...and
×