-
Content Count
1489 -
Joined
-
Last visited
-
Days Won
36
Everything posted by Dave Nottage
-
Use a DataModule
-
android Android to Delphi syntax [PlaybackParams] [PlaybackSpeed]
Dave Nottage replied to Tntman's topic in FMX
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. -
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
-
Custom TrueType font in FMX Android app?
Dave Nottage replied to Lars Fosdal's topic in Cross-platform
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 -
Custom TrueType font in FMX Android app?
Dave Nottage replied to Lars Fosdal's topic in Cross-platform
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'; -
Adding new Items to the Project Tree?
Dave Nottage replied to Memnarch's topic in Delphi IDE and APIs
Not through the ToolsAPI. Just curious: what kind of node do you want to add? -
Custom TrueType font in FMX Android app?
Dave Nottage replied to Lars Fosdal's topic in Cross-platform
The same method works OK on mine with Font Awesome. Which font(s) are you using? -
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.
-
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.
-
Boolean evaluation
Dave Nottage replied to Ole Ekerhovd's topic in Algorithms, Data Structures and Class Design
That was exactly my thought when you made this comment: What was the error, and why was it hard to catch? -
There appears to be an ANDROID64 define (it's all over the Delphi source). Probably just not documented?
-
In what circumstances would the code do something different?
-
So is CodeGear
-
Controls that support ControlType of Platform appear above the MapView. Not sure if that helps you...
-
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
-
Squint and read: CreateFormFromStings
Dave Nottage replied to Darian Miller's topic in RTL and Delphi Object Pascal
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". -
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.
-
Java version used for bundle tool (Android 64 aab) and error
Dave Nottage replied to Chris Pim's topic in FMX
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. -
That's because you cannot retrieve existing SMS messages on iOS - this is a privacy restriction from Apple. You cannot even intercept new messages.
-
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.
-
Which delphi version creates 17.3 project files?
Dave Nottage replied to dummzeuch's topic in Delphi IDE and APIs
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/ -
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
-
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
-
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?
-
AddFontResource/Ex not working on some machines
Dave Nottage replied to Dave Nottage's topic in Windows API
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.