-
Content Count
1560 -
Joined
-
Last visited
-
Days Won
36
Everything posted by Dave Nottage
-
Need help converting java instruction to delphi
Dave Nottage replied to Ranja AZ's topic in Algorithms, Data Structures and Class Design
Unlikely. Such tools are to create imports from .jar or .class files, not convert Java code to Delphi. Your main problem will be whether OnPrintListener is a class or an interface, because you cannot implement a descendant of a Java class in Delphi - it needs to be done in Java. Java interfaces however, can be implemented in Delphi by creating a descendant of TJavaLocal, and implementing the interface in question. There are a number of examples of descendants of TJavaLocal throughout the Delphi source. In order to determine what OnPrintListener is, you could use the aforementioned tools to import the Java classes from the .jar that you mentioned, assuming that it is the one that contains com.nexgo.oaf.apiv3. -
Since iOS 8, use the PhotoKit framework to access photos in albums: PhotoKit | Apple Developer Documentation I have an import for it, here: https://github.com/DelphiWorlds/Kastri/blob/master/API/DW.iOSapi.Photos.pas Which likely needs updating, because I think I imported it around iOS 9 era. This will not help you however, if you are saving photos as files somewhere. You can retrieve the filename from an asset in the gallery, bearing in mind can be traps in doing so: https://medium.com/@slk11075/traps-for-phasset-how-to-get-filename-from-phasset-67d856e75c64
-
If you haven't already, try using a different cable
-
Are you actually including that unit in your source? If so, where you have declared it, please use Ctrl-Click or right-click and Open File At Cursor. It should find it in the Delphi source in the fmx folder. If it finds it anywhere else, that's probably the issue.
-
You didn't answer my other question, i.e:
-
The test project: Does not have "Secure File Sharing" checked in the Entitlements section of the Project Options, Does not request the required permissions at runtime. Fixing these makes it work for me on Android 11.
-
RAD Studio 10.4.1 my first iOS app - can error
Dave Nottage replied to cellb9's topic in Cross-platform
iOS simulator is currently not supported. Use a real device -
On Android, problems in deployment can cause the app to fail to start, however you have indicated it is also a problem on iOS, so it is more likely to be a problem with the initialization of one of the units included. Can you create a blank app that runs OK? If so, use that, and start adding your original to the project until it breaks - then you have a reproducible example.
-
I have an FMX component with a published TBitmap property, but the property is not being read when the component is loaded (the other properties are). Holger Flick's article suggests that it is possible: https://flixengineering.com/archives/166 Is there something special I need to do to make it work? This is what the declaration looks like: TCustomNativeDoodad = class(TPresentedControl) private function GetMaxImage: TBitmap; function GetMinImage: TBitmap; function GetModel: TCustomNativeDoodadModel; overload; function GetValue: Single; procedure SetValue(const Value: Single); function GetOnValueChange: TNotifyEvent; function GetOrientation: TDoodadOrientation; procedure SetMaxImage(const Value: TBitmap); procedure SetMinImage(const Value: TBitmap); procedure SetOnValueChange(const Value: TNotifyEvent); procedure SetOrientation(const Value: TDoodadOrientation); protected function DefineModelClass: TDataModelClass; override; function RecommendSize(const AWishedSize: TSizeF): TSizeF; override; public constructor Create(AOwner: TComponent); override; property MaxImage: TBitmap read GetMaxImage write SetMaxImage; property MinImage: TBitmap read GetMinImage write SetMinImage; property Model: TCustomNativeDoodadModel read GetModel; property Orientation: TDoodadOrientation read GetOrientation write SetOrientation; property Value: Single read GetValue write SetValue; property OnValueChange: TNotifyEvent read GetOnValueChange write SetOnValueChange; end; [ComponentPlatformsAttribute(pfidiOS or pidAndroid)] TNativeDoodad = class(TCustomNativeDoodad) published property Align; property Anchors; property Height; property Margins; property MaxImage; property MinImage; property Orientation; property Position; property Size; property Value; property Visible default True; property Width; property OnValueChange; end; SetMaxImage and SetMinImage are not being called when the component is being loaded
-
Which is the whole problem - they're not called when the values are streamed. I needed to override the Loaded method to see that they are.
-
If it reproduces the problem, it would be extremely useful.
-
I assume you mean do the equivalent code for iOS?
-
See my first reply.
-
Which means you'll need to do: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
-
If you installed Delphi from scratch, you'll still need to apply the patches (there's 4) In a Terminal window on the Mac, can you run this command? /usr/bin/xcodebuild -version -sdk In the output there should be at least one entry of MacOSX
-
What do you mean by hang? Have you checked to see if PushService is non-nil when executing this line? ServiceConnection := TPushServiceConnection.Create(PushService);
-
Please pay attention to compiler warnings. TPushService.TServiceNames.GCM has been deprecated. Use TPushService.TServiceNames.FCM
-
PAServer Error: file permissions do not allow debugging
Dave Nottage replied to ChrisChuah's topic in Cross-platform
Please see: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Acquiring_Permission_to_Support_Debugging_on_a_Mac Although that page needs fixing. The file in question is: dbkosx_27_0 -
Discover all LAN network with a PC
Dave Nottage replied to limelect's topic in Network, Cloud and Web
Either you posted the wrong source (a VCL app), or your question needs editing. It appears you wanted to replicate some Java code in Delphi. -
Discover all LAN network with a PC
Dave Nottage replied to limelect's topic in Network, Cloud and Web
What have you tried? Does none of it succeed, or only certain parts? -
Use a logcat viewer to check the log messages for any errors. Beyond that, you're going to need to give more detail about what is in the app, and perhaps a reproducible example if possible.
-
Looking for help in the code signing and certification for Mac OS
Dave Nottage replied to meshael's topic in FMX
You could use Grijjy's DeployMan tool - it makes this process a lot easier. They describe it in this article: https://blog.grijjy.com/2017/01/30/embed-facebook-sdk-for-android-in-your-delphi-mobile-app-part-2/ In the section titled "Add the resources to the Delphi Deployment Manager for your Android project" -
Tools|GetIt Package Manager. In Categories, filter by Patches and Hotfixes: Unless the patch has been fixed by now, you need to also download the latest PAServer. Please see: https://delphiworlds.com/2020/12/apple-patch-re-patched/
-
Looking for help in the code signing and certification for Mac OS
Dave Nottage replied to meshael's topic in FMX
That's something I need to do. There's basic help for the "MonkeyBuilder" edition, and virtually zero for the "full" version which is in beta. I'll make sure I can help while working on some doc. The installer for Mosco itself actually just the standard .pkg format, created with the pkgbuild command: https://www.manpagez.com/man/1/pkgbuild/ I may look into using some of the options in order to make creating installers more customisable -
Were there any particular classes that apply to you for that bug? Well, as you can see, I share your pain with that particular one 😉