Jump to content

Dave Nottage

Members
  • Content Count

    1626
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by Dave Nottage

  1. Dave Nottage

    D12 TItemClickEvent undeclared identifier

    Please post a reproducible example.
  2. Dave Nottage

    Mouse cursor

    Updated JavaScript: cJavaScriptClickAtXY = '(function() {'#13#10 + 'var windowX = %d, windowY = %d'#13#10 + 'let x = windowX - (window.scrollX || window.pageXOffset)'#13#10 + 'let y = windowY - (window.scrollY || window.pageYOffset);'#13#10 + 'var element = document.elementFromPoint(x, y);'#13#10 + 'while (element) {'#13#10 + ' if (element.tagName !== "A" && !element.hasAttribute("onclick"))'#13#10 + ' element = element.parentElement;'#13#10 + ' else'#13#10 + ' break;'#13#10 + '}'#13#10 + 'if (element) {'#13#10 + ' var clickEvent = document.createEvent("MouseEvents");'#13#10 + ' clickEvent.initMouseEvent("click", true, true, window, 0, 0, 0, x, y, false, false, false, false, 0, null);'#13#10 + ' element.dispatchEvent(clickEvent);'#13#10 + '} else'#13#10 + ' console.log("No clickable element found at coordinates:", x, y);'#13#10 + '})()';
  3. Dave Nottage

    Mouse cursor

    I think it may be that the click is being invoked on the span, or the image (i): <li> <a href="https://en.delphipraxis.net/forum/28-fmx/"> <span>FMX <i class="fa fa-angle-right"></i></span> </a> </li> When it needs to be on the anchor (a) element, so I'll need to tweak the JavaScript a bit.
  4. Dave Nottage

    Mouse cursor

    const cJavaScriptClickAtXY = '(function() { '#13#10 + 'var windowX = %d, windowY = %d'#13#10 + 'let x = windowX - (window.scrollX || window.pageXOffset)'#13#10 + 'let y = windowY - (window.scrollY || window.pageYOffset);'#13#10 + 'var element = document.elementFromPoint(x, y);'#13#10 + 'if (element) {'#13#10 + ' var clickEvent = document.createEvent("MouseEvents");'#13#10 + ' clickEvent.initMouseEvent("click", true, true, window, 0, 0, 0, x, y, false, false, false, false, 0, null);'#13#10 + ' element.dispatchEvent(clickEvent);'#13#10 + '} else'#13#10 + ' console.log("No element found at coordinates:", x, y);'#13#10 + '})()'; // Example call: WebBrowser1.EvaluateJavaScript(Format(cJavaScriptClickAtXY, [Cursor_Position_X, Cursor_Position_Y])); The code above should do what you want - it has had very limited testing in my environment
  5. Dave Nottage

    Mouse cursor

    That's not a complete example, and obviously not Windows, so I'm not sure why you felt the need to add a unit that requires Windows.
  6. Dave Nottage

    Delphi 12.2 and MacOS Sequoia (15.0) : No provisioning profile

    In macOS 15, the location for provisioning profiles is in another folder. One solution to fix this is: In Xcode menu, click Xcode > Settings, and select Accounts Select the relevant Apple ID (or add yours if none exists in the list) Click "Download Manual Profiles" Then PAServer should find the profile
  7. Dave Nottage

    Mouse cursor

    Presumably you are attempting to use this unit on a non-Windows platform, which it is not intended for. Please give a complete example of what you are trying to do.
  8. Dave Nottage

    Uses units qualifiers?

    Delphi 2005
  9. Dave Nottage

    OutOfRange Error with TComboEdit in Delphi FMX

    I confirm the behaviour
  10. Dave Nottage

    Mouse cursor

    Thanks.. I'll look into it
  11. Dave Nottage

    Mouse cursor

    You need to add dw-kastri-base-3.0.0.jar to the Libraries node of the Android targets. If you want to target both 32-bit and 64-bit, unfortunately because of a bug in Delphi 11.3, you'll need to make a copy of the jar file in another folder in order to be able to add it to both targets. I've been having that trouble, too. It works OK for me in some apps, but not in that demo. Still looking into why. "Slightly icy"?
  12. Dave Nottage

    Help needed to sign .aab file

    You're using the wrong JDK. Later versions of Delphi require Eclipse Temurin Open JDK. In the Delphi menu, click Tools > Manage Features, then scroll the right hand side down to the bottom, select Eclipse Temurin Open JDK and click Apply. You'll then need to configure the Android SDK settings to use it:
  13. Dave Nottage

    Mouse cursor

    You need to use a control that supports proper "z-order" with platform-derived controls such as TWebBrowser. Kastri has such controls (TNativeImage, TNativeRectangle etc), and I've now created a demo that could be used as a starting point to achieve what you want. Please note that you would need to first install the KastriFMX package, which contains the native controls.
  14. Dave Nottage

    Migrating Delphi to new device

    https://my.embarcadero.com/#downloadsPage
  15. Dave Nottage

    Delphi 12.2 available for download

    It wasn't intentional.
  16. Dave Nottage

    Delphi 12.2 available for download

    Same is happening for experts compiled with 12.2, i.e. they will not load in 12.1: https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1838
  17. Dave Nottage

    Get Unique Device Identifier under iOS Delphi 12

    It's declared in: Androidapi.JNI.Provider
  18. Dave Nottage

    clear a tjsonobject

    Not "out of the box". You could perhaps do this: while LJSONObject.Count > 0 do LJSONObject.RemovePair(LJSONObject.Pairs[0].JsonString.Value).Free;
  19. Dave Nottage

    partial_info.plist not found

    A very quick Google revealed this for me: I suggest checking that you have not accidentally disabled items from the deployment (from the main menu - Project > Deployment)
  20. Dave Nottage

    File Open Dialog Preview

    Set the fdoForcePreviewPaneOn flag on in the Options property. It should be noted however, that this will work only where preview of the selected file type is supported.
  21. Dave Nottage

    Delphi 12 Android - White background at start

    Since I was curious, I had a bit of a play around and came up with the demo at this link. I recommend reading the readme
  22. Dave Nottage

    Delphi 12 Android - White background at start

    I haven't done any more about it since then
  23. Dave Nottage

    Can not debug on iOS

    No.
  24. Dave Nottage

    Delphi 12.2 available for download

    Apparently they're working on a new agreement (presumably with Eugene's estate?) to include it. Marco/Ian mentioned this in the webinar.
  25. Dave Nottage

    Problem using Kastri PDFControl

    I can replicate the behaviour using the original demo, adding a TabControl with 2 tabs. Reversing the calls fixes it for me, i.e. TabControl1.SetActiveTabWithTransition(TabItem17, TTabTransition.Slide, TTabTransitionDirection.Normal); FPDFControl.LoadPDF(sFile); ..however I can look into why the original way around is not working like it should.
×