Jump to content

Dave Nottage

Members
  • Content Count

    1489
  • Joined

  • Last visited

  • Days Won

    36

Everything posted by Dave Nottage

  1. Dave Nottage

    Global StyleBook component

    Use a DataModule
  2. You cannot rewrite that java code into Delphi code, since it is creating a descendant of a Java class, which is presently not possible with Delphi. You can however create descendant in Java code that can then be consumed by Delphi. I've been meaning to do a blog post about this for quite some time now because it requires a fair amount of explanation as to how to go about it.
  3. Dave Nottage

    Can't find compiled macOS app

    It's in on the Mac, in /Users/[username]/PAServer/scratch-dir/[computername]-[profilename], where [username] = the macOS username [computername] = the Windows computer name you're deploying from [profilename] = the connection profile name you're using eg: /Users/dave/PAServer/scratch-dir/dell-Mac I have Delphi expert and companion macOS app that has functionality that opens Finder on the Mac to show you exactly where it is, here: https://github.com/DelphiWorlds/Mosco
  4. Dave Nottage

    Custom TrueType font in FMX Android app?

    Your example doesn't work on Android < 10 without those changes. I'm wondering how it ever would have, unless it included a font file without -Bold or -Regular on the end (which is not in the example). I've attached an update to the example that works on my Android 5.0.1 and Android 10 devices. true_font_b.zip
  5. Dave Nottage

    Custom TrueType font in FMX Android app?

    You'll need to modify the patch in FMX.FontGlyphs.Android.pas to look like this: NameFont := TPath.Combine(TPath.GetDocumentsPath, CurrentSettings.Family); if not CurrentSettings.Style.Weight.IsRegular and TFile.Exists(NameFont + '-Bold.ttf') then NameFont := NameFont + '-Bold.ttf' else if CurrentSettings.Style.Weight.IsRegular and TFile.Exists(NameFont + '-Regular.ttf') then NameFont := NameFont + '-Regular.ttf' else NameFont := NameFont + '.ttf';
  6. Dave Nottage

    Adding new Items to the Project Tree?

    Not through the ToolsAPI. Just curious: what kind of node do you want to add?
  7. Dave Nottage

    Custom TrueType font in FMX Android app?

    The same method works OK on mine with Font Awesome. Which font(s) are you using?
  8. Dave Nottage

    Mac Catalina and OpenSSL + Indy

    Yes; I would not have mentioned them otherwise. Depending on the version of macOS (especially later versions), the OpenSSL libs will not work with Indy. Perhaps something in Indy changed.
  9. Dave Nottage

    Mac Catalina and OpenSSL + Indy

    Which dylibs are you using? These worked for me on whatever version of 10.15.x was current 6 months ago: https://github.com/DelphiWorlds/KastriFree/tree/master/Lib/OpenSSL/1.0.2s/macOS I have not tested them on 10.15.3 as yet.
  10. Dave Nottage

    Boolean evaluation

    That was exactly my thought when you made this comment: What was the error, and why was it hard to catch?
  11. Dave Nottage

    ANDROID64 Conditional compiling

    There appears to be an ANDROID64 define (it's all over the Delphi source). Probably just not documented?
  12. Dave Nottage

    ANDROID64 Conditional compiling

    In what circumstances would the code do something different?
  13. Dave Nottage

    Test your product with UTF-8 beta setting

    So is CodeGear
  14. Dave Nottage

    TMapView overlay

    Controls that support ControlType of Platform appear above the MapView. Not sure if that helps you...
  15. Dave Nottage

    Android crashes in formula

    On iOS, the first location change has values of 0 for OldLocation.Latitude and OldLocation.Longitude. On Android, they're both NaN, so your code will fail in that case. You should do this check (at least): if not IsNan(Latitude1) and not IsNan(Longitude1) then
  16. Dave Nottage

    Squint and read: CreateFormFromStings

    More a case of: a major release is the best time to do it, since it can be interface breaking. If, after the change, a users code does not compile, I doubt they're going to say: "I want it back with the incorrect spelling". They're more likely to say: "I'm upset that you spelled it wrong in the first place, but fixing it is way better".
  17. Dave Nottage

    Android, how to call a TJIntent

    You're misrepresenting my reply. It is exactly why I said to examine that file. It certainly does have an effect when creating new projects.
  18. Dave Nottage

    Java version used for bundle tool (Android 64 aab) and error

    Pretty sure it uses the JDKPath entry at HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\PlatformSDKs\AndroidSDK25.2.5_64bit.sdk Which is reflected in the "Java" tab of the Android SDK settings in SDK manager.
  19. Dave Nottage

    How Fetch SMS on Android and ios

    That's because you cannot retrieve existing SMS messages on iOS - this is a privacy restriction from Apple. You cannot even intercept new messages.
  20. Dave Nottage

    How Fetch SMS on Android and ios

    Check this link: https://forums.embarcadero.com/thread.jspa?threadID=256233 This is a link to the demo I created: https://forums.embarcadero.com/thread.jspa?messageID=899142 Edit: Just realised you want it for 10.3.3. That old demo might still work, though. If not, I'll help modify it Edit 2: Also now realised you want existing messages. Probably better to use the conversations class: https://developer.android.com/reference/android/provider/Telephony.Sms.Conversations. If the code on FMX Express does not work, please indicate what errors you're having. It may be that you just need to request the READ_SMS permission.
  21. Dave Nottage

    Which delphi version creates 17.3 project files?

    Doesn't look like there was any released version (including betas?) according to the table here: https://wiert.me/2016/09/06/delphi-version-info-table-need-help-with-these-projectversion-for-c-builder-delphi-2005-and-2006-dllsuffix-for-c-builder-appbuilder-1-13-codename/
  22. Dave Nottage

    Java class cannot be found

    JNI.rar did not include the compiled .jar file, nor did the project have .jar file added to libraries. I updated the project to Delphi 10.3.3, compiled the UseAsJar.java file into UseAsJar.jar, added it to the project, zipped it and attached it to this reply. The project now works OK here. You can "downgrade" the project to whatever version of Delphi you're using by right-clicking the "Libraries" node and click "Revert System Files to Default" prjJNITest.zip
  23. Dave Nottage

    Java class cannot be found

    At the very top of the Java file: package com.mydomain.mypackage (for example) There's a plethora of examples on the internet, e.g in the files here: https://github.com/DelphiWorlds/KastriFree/tree/master/Java
  24. Some code I'm working with uses AddFontResource or AddFontResourceEx - both return a positive value (in this case 1), so according to the documentation the font is added successfully, however they are not actually displaying correctly. The problem happens only on certain machines, in this case Getac Windows Tablet (F110 and T800 models), but the fonts are displayed correctly using the same application on a Microsoft Surface. All machines are using an administrator user account. Any ideas as to why it does not work on the machines in question?
  25. Dave Nottage

    AddFontResource/Ex not working on some machines

    I think you may be right. No, since the goal is to not have them installed. Having said that, I have a bad feeling that the machines on which it does work may have the font already installed (not sure if anyone actually checked), especially given Hans' answer. I'll know for sure tomorrow.
×