A couple of weeks ago I posted in https://forum.xojo.com/43872-inspecting-variant-data/ that I had problems with with loading variant data. Turns out I was wrong and the preference value itself is the problem.
This code here fails:
EmailClientDictionary = globals.thePrefs.GetPrefDictionary("EmailInfo_MailApps")
where GetPrefDictionary starts with
dim theCFPrefs as new CFPreferencesMBS
Dim theCFObject As CFObjectMBS = theCFPrefs.CopyAppValue(NewCFStringMBS(fieldName), theCFPrefs.kCFPreferencesCurrentApplication)
if theCFObject = Nil then Return nil
I had sent the users a version for testing which shows that the “return nil” is done here. Then I had the customers send me a preference file, which shows that “EmailInfo_MailApps” is available and has the correct data. I also had the customers do an AppleScript with
do shell script "defaults read com.mothsoftware.mailarchiverx"
getting
[quote] “EmailInfo_MailApps” = {
Entourage = “{\\\\“ServerName\\\\”:\\\\”\\ …[/quote]
as result.
Am I going mad? The code works for most customers. Does anyone have an idea why ages old MBS code wouldn’t work for some customers? Still a High Sierra only problem.