Initial directory don’t works?

This worked before:

dlg.InitialDirectory=SpecialFolder.Documents.Child(“my games”).Child(“BA2”).Child(“Templates”)
dlg.Filter= FileTypes.Text
f = dlg.ShowModal()

Now it open the dialog but showing Documents/My games/BA2/ as default folder, not Documents/My games/BA2/Templates/

Using Mac OSX 10.11
Xojo 2015 2.4

Is “Templates” a file or folder?

With “Templates” a folder, your code works as I expect on 10.11.1 with Xojo 2015r3.1. I see “Templates” selected as the initial folder.

It’s a folder.
I’m stuck because this is (seems) “aleatory” and this has been working for years. Sometimes it happens and others no.
I just updated to 10.11.1 and the same.

Will make an app just to test it, maybe my HD needs some repairs.

Paul I stopped the code just before opening the dialog.
Dim dlg as new SaveAsDialog

ffolder = GetFolderItem (DealPrefs.Folder2Save, FolderItem.PathTypeNative)
if ffolder <> nil then
  dlg.InitialDirectory = ffolder
end if

dlg.SuggestedFileName = AddFileExtension (Filename.Text)
dlg.Filter= FileTypes.Text
f = dlg.ShowModal()

if f <> nil then


Then in Variables, dlg is a SaveAsDialog, open it to see the value in InitialDirectory which is a FolderItem.
The absolute path is (copy and paste)
Macintosh HD:Users:enric:Documents:My Games:BA general:SavedGames:
Native path
/Users/enric/Documents/My Games/BA general/SavedGames
Shell path
/Users/enric/Documents/My\ Games/BA\ general/SavedGames

But, stopping the code here and checking these values, even if they are always the same, sometimes when resume the code, it offer the SavedGames folders and other his parent folder, the BA general.

If this is my fault I don’t understand why this as worked for so many time.

Your code looks fine.

I don’t know why you would be having trouble with it. I’ve never seen the behavior you are describing. Have you tried 2015r3? You might also try different user accounts (or computers) to see if you can reproduce it.

Yes, the same.

I’ll try.

At least now, I know that is not a Xojo bug, so, or it’s my code, or it’s my computer.

Thank you

Hi Paul

I think I found the issue, I made a utility that just do that (open and save to a chosen folder ) and I know how to reproduce this in any computer (Mac).

I may send you the utility or you may pick up in dropbox:

The procedure is as follow:

  • Create in the desktop (it doesn’t matter where) a folder for example named TestNoTag.

  • Create another folder in the desktop named TestYesTag, and assign to the last one a tag, for example yellow.

  • Open the utility and select as default folder: TestNoTag, Use Save and everything works ok, with the Save as dialog open you may navigate, up/down, then close. If you select Save again all is working ok.

  • Then selected as default folder: TestYesTag (the folder that as a tag assigned).
    Then first time you open Save it works, and so on if you just open and close the Save as dialog, but if you navigate in the Save as dialog it doesn’t matter where, when you choose again Save, your default folder is gone and the immediate parent folder is offered as default folder.

I hope I explained well the procedure.

Please create a Feedback case with this information so we can look into it.

Hi Paul I created a Feedback four weeks ago and it doesn’t appears in recently active cases.
The case appears only in “Participating in” as “need review”. Maybe I post it wrongly, or missed to fill something (it’s my first feedback).