-
Content Count
1331 -
Joined
-
Last visited
-
Days Won
29
Posts posted by Dave Nottage
-
-
5 hours ago, pro_imaj said:you should see the font automatically, but it doesn't.
That's because you have Family in the StyledSettings property set to True in the Object Inspector (i.e. at design time). You need to set it to False
-
6 hours ago, pro_imaj said:The deficiency I made was the codes that you added to the button,
It also works for me just by having the Font.Family property in TextSettings set to the correct value (i.e. Anton) at design time. Using the button and code was just to demonstrate that there's a very obvious change in the font.
I suspect there's something else wrong with your project, which is why I asked to post a test case.
-
1
-
-
14 minutes ago, pro_imaj said:There is a mismatch problem between the latest version of Delphi (10.3.3) and the latest version of xcode.
I'm using Delphi 10.3.3, the latest released version of Xcode (11.4), building against the latest iOS SDK (13.4) and it works on my iPhone X which has iOS 13.4.
I've attached my test project (which uses the Anton font, from here: https://fonts.google.com/specimen/Anton). Perhaps if you have a test project, you could attach it so it might be discovered what is going wrong.
-
1
-
-
18 minutes ago, pyscripter said:How come this did not affect you?
Actually it did - sorry, I used the workaround. I think isolation has caused some memory loss
-
4 minutes ago, pyscripter said:The -version -skd happens while the dialog is showing.
Yes, that's what PAServer runs to discover what SDKs are on the Mac.
5 minutes ago, pyscripter said:Nothing seems to happen when I press OK.
Actually, I'm not sure now whether PAServer will show anything when it copies the files to the local machine. I was hoping it would display an error (if any).
6 minutes ago, pyscripter said:Do I need to download the SDK in the Mac? The XCode version is 11.4.
You should not need to, no. In case there is something really wrong though, on the Mac can you:
- Go to the Applications folder in Finder
- Right click on Xcode and click Show Package Contents
- Navigate to: Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs and make sure there's a MacOSX.sdk folder there (with subfolders)
The only other thing I can think of is a rights issue (i.e. PAServer somehow does not have rights to the SDK subfolders), but that's a stretch
-
Your moniker says you're using Delphi 10.2 Tokyo. Is that still the case?
Adding macOS 10.15.4 SDK works OK for me using 10.3.3. If you are using 10.3.3, it might be useful to turn on verbose mode in PAServer (v command)
-
On 4/16/2020 at 7:00 PM, pro_imaj said:Have you tried and seen the correct result?
Yes, as per the article.
Make sure you're actually deploying the font files (Project|Deployment in the Delphi IDE), and to the correct Remote Path. i.e: .\
Also make sure that the entries in info.plist.TemplateiOS.xml match exactly with the actual filename - filenames are case sensitive on iOS.
-
1
-
-
1 hour ago, pro_imaj said:Can you look at the project file I made in the annex
Your info.plist.TemplateiOS.xml file is incorrect. Instead of:
<key>Segoe UI</key>
It should be:
<key>UIAppFonts</key>
As per the article
-
2 hours ago, pro_imaj said:Is there an easy way to make the Segoe UI the font of the project I compiled by macOs?
http://firemonkeyblog.blogspot.com/2014/12/how-to-use-custom-font-in-ios-delphi.html
-
1
-
-
The whole point is to shift controls up when they would be otherwise covered by the virtual keyboard. There is no point in shifting them down. In order to do that, you would need to have a control (e.g. a TLayout) at the top of the scrollbox and change the height so that the other controls move down. It is way more trouble than it is worth, and I doubt that users would even expect it to happen.
-
38 minutes ago, pro_imaj said:But before I was developing with the same font without any problems, I published the applications to the app store and there was no problem.
Please indicate what you mean by "before", e.g. was it a different version of Delphi? Deploying to a device with a different version of iOS, if so, which version(s)? Were your applications deploying the custom fonts?
.
-
1
-
-
I must be missing something. What's the actual issue?
-
I have some .NET interop code where I've managed to load objects and read properties, however I am having trouble with setting a property on an object. Here's the relevant parts of the Delphi code:
uses mscorlib_TLB, Winapi.ActiveX; type // Irrelevant parts of the code omitted TDotNetObject = class(TObject) private FTarget: OleVariant; FType: _Type; public procedure SetProperty(const APropertyName: string; const AValue: OleVariant; const AIndex: Integer = -1); end; function VariantToPSafeArray(const AValue: Variant): PSafeArray; begin Result := PSafeArray(VarArrayAsPSafeArray(AValue)); end; procedure TDotNetObject.SetProperty(const APropertyName: string; const AValue: OleVariant; const AIndex: Integer = -1); var LPropertyInfo: _PropertyInfo; LIndex: PSafeArray; begin if AIndex >= 0 then LIndex := VariantToPSafeArray(VarArrayOf([AIndex])) else LIndex := nil; LPropertyInfo := FType.GetProperty(APropertyName, BindingFlags_Instance or BindingFlags_Public or BindingFlags_NonPublic); if LPropertyInfo <> nil then LPropertyInfo.SetValue(FTarget, AValue, LIndex); end; procedure UpdateDefectStatus(const ADefectID, AStatus: Integer); var LObject: TDotNetObject; begin // ** Code to obtain the object omitted *** LObject.SetProperty('Status', AStatus); end;
An error is thrown when LPropertyInfo.SetValue is called in TDotNetObject.SetProperty:
The Status property type in C# is declared:
public enum DefectStatus { /// <summary> /// Defect Reported. /// </summary> Reported, /// <summary> /// Defect assessed. /// </summary> Assessed, /// <summary> /// Defect on work order. /// </summary> OnWorkOrder, /// <summary> /// Defect closed. /// </summary> Closed }
I found a solution for how to handle this situation using C# here:
https://stackoverflow.com/a/13270302/3164070
However I'm a bit lost as to how to do the same in Delphi. Any ideas? -
57 minutes ago, Rollo62 said:at least you cannot edit any custom styles
Yes, that is a drawback of using a datamodule. That said, different custom styles for the same controls inside the same application seems like inconsistent UI design to me.
-
4 hours ago, Tntman said:What are your solutions ?
Use a DataModule
-
7 hours ago, Tntman said:Problem was that I didnt know how to rewrite this android code into delphi FMX code
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:
-
1
-
-
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.
-
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';
-
21 hours ago, Memnarch said:possible to add non-file related entries under a Project in the Project-Tree through the toolsapi?
Not through the ToolsAPI. Just curious: what kind of node do you want to add?
-
8 hours ago, Aamgian said:on Android 10 it doesn't work,
The same method works OK on mine with Font Awesome. Which font(s) are you using?
-
6 hours ago, CarloM said:but you deploy dylib ?
Yes; I would not have mentioned them otherwise.
6 hours ago, CarloM said:actually I use openssl from mac os
Depending on the version of macOS (especially later versions), the OpenSSL libs will not work with Indy.
6 hours ago, CarloM said:compiled app with 10.3.2 works ok but no last version of delphi
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.
-
49 minutes ago, Ole Ekerhovd said:Please elaborate so I can learn from it
That was exactly my thought when you made this comment:
5 hours ago, Ole Ekerhovd said:It was a logical error in the code, and really hard to catch too.
What was the error, and why was it hard to catch?
-
2
-
Delphi fmx comes standard in iOS font
in FMX
Posted
I see what the problem is now: it's because selecting Segoe UI at design-time results in the Family value not being stored in the .fmx, because it's the default for Windows.
I'd consider that a design fault, since it does not account for using a font with the same name on platforms other than Windows.
Easiest solution: use something that looks like Segoe UI, but isn't 🙂 Any other solution would seem a bit difficult..