Miletus ToDoList Demo - Mac versus Windows

I have compiled the demo app for both Windows and Mac OS. On Windows the database link works and the drop down for the datetimepicker works. However the datetimepicker does not show the calendar control on Mac. Also the link to the database file does not seem to work. Apologies if I have missed something obvious but if you can help that would be much appreciated.

Hi,

We'll investigate the date selector issue.

For the database file, can you try to set the path to an absolute path? macOS apps are different - the core binary is inside a folder structure, which means the same relative path you have on Windows won't work for macOS.
You can also try to set the path at runtime (before activating the dataset), this way you have access to the GetMiletusPathP(APathType: Integer) promise to get the common system specific paths.

Looks like the date selector issue is depending on the WebKit version you have. We've tested with 2 macOS devices here and one of them (an older installation) was able to reproduce the issue while the other (newer) one was working as expected.

Are you using an older macOS device? This bug report could be related to what you are seeing.

Yes it looks like it works on Mac OS Monterey (12.2) but not on Mojave (10.14.6). I need to work out whether there is a way to install the latest webkit on older versions of the OS. Supposedly the latest version of Safari upgrades Webkit but clearly that has not worked. Of course the absolutely latest version of Safari does not work on 10.14.6.

Thanks. The absolute path does work which is good. The GetMiletusPath function does not appear to work on a Mac though. I tried all the integer inputs in turn (NP_APPDATA, NP_APPPATH, NP_DESKTOP, NP_DOCUMENTS, NP_DOWNLOADS, NP_EXE, NP_HOME, NP_MUSIC, NP_USERDATA, NP_PICTURES, NP_TEMP NP_VIDEO). With an absolute path though it should be a reasonable workaround to my problem.

You'll need to use GetMiletusPathP instead. There is no synchronous path retrieval under macOS. If you use the promise based GetMiletusPathP, you can await the result.

TForm1 = class(TMiletusForm)
    [async]
    procedure MiletusFormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

procedure TForm1.MiletusFormCreate(Sender: TObject);
var
  p: string;
begin
  p := Await(string, GetMiletusPathP(NP_DESKTOP));
end;
1 Like

That works well. Thanks for your reply and help.