Hello Phil,
Thanks for your response.
Actually, it is not the problem. I am just using the code snippet to show where the OS X positions me (by using GetCurrentDir) and add '/Downloads/' in order to use the auto-generated shortcuts (in the app container) buy the software first run. The software is launched from the /Applications dir.
I experimented by using absolute and relative OpenDialog.InitialDir paths to push the TOpenDialog appear opened in some dir, but instead of opening the dialog at all - Access violation is raised. The entitlements signed into do not play any role - just enabling the sandboxing.
But it seems from here:
http://forums.realsoftware.com/viewtopic.php?f=7&t=44162 (and from many other places) that the Carbon TOpenDialog/TSaveDialog/TOpenPictureDialog do not use the Powerbox, but the Powerbox is used by the NSOpenPanel and NSSavePanel.
The link contains links to code snippets, which should solve the problem or to suggest solution, but they are dead or are used as marketing tricks, however the discussion is correct - I am observing the same problem
Also, I used this code just to figure out a possible way for solution:
...
var
v: NSOpenPanel; { unit AppKit }
begin
v:=NSOpenPanel.Create;
v.runModal;
...
and the open dialog (panel) is opening in the desired Documents/ folder
But, I am searching for elegant solution, for example a solution that use TOpen/Save/Picture dialogs, which redirect to Powerbox and this solution is tested and released.
It is not OK when the software is ready for release and when the tests of the signed software have to be just to validate and adjust it by entitlements to start writing modules which inter-operate with the OS specifics.
Any suggesting are welcome!
Best Regards