I have written an external which works with lots of arrays which I save as data files. To load these files into my external, I click on the „Open File“ menu item of my external which calls the open_dialog function, subsequently opening a dialog window which lets me select the file I want to load, and then calling the path_opensysfile function to actually loading it.
Now I would also like to have the option to automatically load one of these files when opening a patch containing this external. To achieve this, I send a list including the path ID (as an int, which I had previously gathered from the open_dialog function)) and filename (as a string) to the list input of my external, which then calls the path_opensysfile function directly (passing the path ID and filename as arguments).
This works fine on my MacPro (OS 10.6.8), but there is a problem on my MacBook (OS 10.8.5). When I send this list to my external, I get an error message (returned from path_opensysfile).
I found out a strange behaviour. When I open my patch and first call the open_dialog function (by clicking on the „Open File“ menu item of my external), then things work fine. It doesen’t really matter if I select a file to be loaded, I can just click on the cancel button, which closes the dialog window without doing anything. If I then send the list to my external, the file will be loaded.
Can anybody explain this and give me a hint how I could manage to load my file directly (which works on my MacPro)?