Jump to content

Dave Nottage

Members
  • Content Count

    1626
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by Dave Nottage

  1. Dave Nottage

    Running the IDE in a VM on Mac Book Pro?

    Correct, however I did specify that I have a Mac. For a while I thought "well, that's ridiculous.. I have the Mac already, why would I want to run it in a VM?" 😉
  2. Dave Nottage

    Running the IDE in a VM on Mac Book Pro?

    My 2c: I have a MacBook Pro, and for Windows, VirtualBox has served me very well for > 7 years. I also use Parallels, however only for macOS VMs, because VirtualBox has been lagging behind in supporting newer versions of macOS. I use macOS VMs on macOS to test Delphi (and other software) against macOS betas and Xcode betas 🙂
  3. Dave Nottage

    cocos2d multiplatform

    I don't have time to help with this particular project, however for iOS and macOS you should be using Metal: https://developer.apple.com/documentation/metal?language=objc Which is what Delphi is moving towards (from 10.4, apparently)
  4. Dave Nottage

    Resolve a uses clause unit path?

    "Easy" can be subjective 🙂 You'd need to have both the IDE search paths *and* the project paths. For the first, you could read the values from Search Path value for the appropriate platform in the Library subkey in the registry. For the second, you could obtain an IOTABuildConfiguration (for the relevant config) from the IOTAProjectOptionsConfigurations for the active project, and call GetValues for sUnitSearchPath (from DCCStrs). You'd also need to expand any macros in the paths. Then, starting from the project paths first, check each path (in order) for existence of the file. I think they have code for retrieving the paths somewhere inside CnWizards: https://github.com/cnpack/cnwizards
  5. From the documentation: http://docwiki.embarcadero.com/Libraries/Rio/en/System.Bluetooth.Components.TBluetoothLE.GetCharacteristic "Warning: You must read the value of the AService.Characteristics property before you call GetCharacteristic. Otherwise, GetCharacteristic returns nil."
  6. Dave Nottage

    PDF view on Android

    This works for 10.3.x if you have some kind of PDF viewer installed on the device: uses Androidapi.JNI.GraphicsContentViewText, Androidapi.Helpers, Androidapi.JNI.Net; procedure OpenPDF(const AFileName: string); var LIntent: JIntent; LUri: Jnet_Uri; begin LUri := TAndroidHelper.JFileToJURI(TJFile.JavaClass.init(StringToJString(AFileName))); LIntent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_VIEW); LIntent.setDataAndType(LUri, StringToJString('application/pdf')); LIntent.setFlags(TJIntent.JavaClass.FLAG_GRANT_READ_URI_PERMISSION); TAndroidHelper.Activity.startActivity(LIntent); end;
  7. Unless your app is called "Facebook", "Twitter", or "Instagram", yeah 😉
  8. Dave Nottage

    Screenshots for new app

    How do you manage that? Thanks for the link!
  9. No, I was specifically referring to Beacons. I expect the BLE issue is separate. Now I'm confused: does it work, and if so, only with both?
  10. Dave Nottage

    New project with embedded browser

    I haven't had the need to, however I might take a look at it I'll work on sharing the parts that I can share.
  11. I don't understand how you came to that conclusion. As far as I know, they haven't Yes, with the changes I proposed in the QP report.
  12. Dave Nottage

    New project with embedded browser

    A while ago I was looking for something that's cross-platform (Windows and macOS) so decided to check out CE4. For me, it was extremely difficult to work with, if the goal is to use it for automation. I ended up using TWebBrowser in FMX and wrote a bunch of helper methods for both platforms, one of the most critical being: // macOS class function THTMLHelper.GetBrowserDocument(const ABrowser: TObject): DOMDocument; var LWebView: WebView; begin Result := nil; if Supports(ABrowser, WebView, LWebView) then Result := LWebView.mainFrame.DOMDocument; end; // Windows class function THTMLHelper.GetBrowserDocument(const ABrowser: TObject): IHTMLDocument3; var LBrowser: IWebBrowser; begin if Supports(ABrowser, IWebBrowser, LBrowser) then Supports(LBrowser.Document, IHTMLDocument3, Result); end;
  13. They haven't: there is critical code missing that allows them to work in the background: https://quality.embarcadero.com/browse/RSP-21460
  14. Dave Nottage

    Install Android SDK manually?

    http://delphi.org/2019/06/manually-installing-android-sdk-ndk-and-java-for-firemonkey-development/
  15. Dave Nottage

    DelphiTwain on 64-bit

    I've finally managed to put together a test case, which is here: https://github.com/DelphiWorlds/MiscStuff/blob/master/Test/RDSTwainTestCase.zip
  16. If it's other than in the project folder, you need to set the Source path in the Debugger section of the Project Options:
  17. Works OK here. My steps: 1. Create a blank FMX app, change platform to OSX 64-bit 2. Add a button and memo 3. Add the code you described 4. Save the project 5. Open FMX.Memo.pas from the source, and save it in the same folder as the project 6. Put a breakpoint in TCustomMemo.GetText 7. Close the file in the editor 8. Run the app with debugging 9. Click the button. IDE opens the local copy, as expected, and stops at the expected breakpoint
  18. Dave Nottage

    [bug] Camera + Effects

    A stack trace would be more helpful. It should appear after you click "Break". If not, click View > Debug Windows > Call Stack or just use Ctrl-Alt-S
  19. Those paths look suspiciously like mine in Kastri Free. What exactly are you compiling? I suggest checking whether you have a unit that references the DLL without having a conditional define, or that the path to it is included for macOS when it should not be
  20. Dave Nottage

    Android, how to call a TJIntent

    If you are using Delphi 10.3, for this situation you do not need to modify AndroidManifest.template.xml yourself. Unless you have other customizations to it, please delete it (or remove your <provider> changes). Go to the Project Options, select Application > Entitlement List and check the Secure File Sharing checkbox.
  21. Dave Nottage

    Android 8.0 Permissions errors using Delphi Rio 10.3

    Right; that would be because, as I said earlier, it is "shown only when permissions are not granted by the user"
  22. Dave Nottage

    Android 8.0 Permissions errors using Delphi Rio 10.3

    You need to trace through the TAndroidPermissionsService.InternalRequestPermissions method in the System.Android.Permissions unit. Note that the rationale is shown only when permissions are not granted by the user.
  23. I found out from Dmitry Arefiev. It really should have been included in the release notes.
  24. libcgsqlite3.dylib is now a "featured" file. Go to Deployment Manager and use the Add Featured Files to add it.
×