saving data (coll) within a built standalone?
Is there a way to save data within a built standalone app? The coll object allows for writing a file but not for defining a path and will write a text file to the folder containing the standalone. i would like to write to a file within the standalone app/folder.
In a standalone this should report where the runtime version of max is, in the package you have built to be your application (on mac at least). You can then use [sprintf] to format a specific name and location to send to [coll].
----------begin_max5_patcher---------- 311.3ocoSEjaCBCD7r4UX4yoQXBQMp8TeGsQUNv1DGAqQ1FUZixeu3EPARaU SStrRLLdXlg0GhXhMlFvI3OvelyXGhXLBJ.v5elIJUMYEJGQSfv6lM6Ey5dk GZ7DbkUi9AzJkOamF29pEx7chKWEOOdF+dYXtHMLSZQ3q6OxaFzipRfD6IqV ULHFVWpwBvSed4IPSse.MdjHN8mjHxj4Cv5bR0VaemTDfNFEEFytsHa4aLVs 6uCc5JZd0gN9GCs7hCc5fpcm1+QEz4Ogfu9J5iRv4TaguUHO9hskG2AXtppp sO1MsgJzHjYpQhcxuWaozRxRZJWrj1XR9+0VxMVaKtvZi7EEtytHQQKfOsKc lZa1fT8+e3mRWN37ZT40FbDG4DN6z44.Nd2nTmWYZuB1agyLXzwnuXH+oSL -----------end_max5_patcher-----------
It appears to report the location of the standalone and not the runtime within the standalone. Formatting the standalone-name as folder in sprintf doesn’t work and results in the file being written beside the standalone. It would be nice if i could write to a file within the standalone(contents). I’d prefer not to write a pref file somewhere else and keep everything contained within the app.
or is this impossible?
----------begin_max5_patcher---------- 715.3oc2WFsaaBCEF9ZxSgER6trHrIDfsq1Svd.1ppLAmFWA1HryZ6p569rO PxRSCfSSJUsJJA4icL+9ymyugGm34mIumo7QeC8Kjm2iS77fP1.dss87Ko2u rfpfg4KX2Iyt0eZSWZ18ZHrVpdnLSVrsiJpd4Zt3lqqYK0MyeHlLKXJhrHxd IJEZDLK.cU6+gmCSkY5+JNc6DsRJzBZIC55G0b5tagXSIWTvzftv+Onbi9vn MgzOTwZjhu+tapc9U7+BcfwyhRivIw1tdZxD6OScjKkLkhdC6EfYEufA5eXv PhAvrv9KN43fgDbhfgbQ.iQfuBlzQtRgjlmQE2zCRvIPRBNFaurHn2bkj21b EPpi.VznLTe0OQIVJDNGJbBIyh5AIwWDjP5EISGmrkkxhgoxbx7VSk9nR3Eg Jy6r1Y5de6jLsgUz+vxu1HKyJ4ZpVWyy1narh81AHOeVYFCVA.QaP5kJeaXK 61xPxh4NXYi+rXYa09OWozTQNsPJXN.HRiociQdWd23OAd20n6VypYzR9f0j DRn8Rbul2QmHRBdGQRW4Ke+20lwgTLS9RUkgGqeAjJ3B1R4Fgd+s0iQN37tD nbCu.25zeTxs3CTxzAjq6C2RgUdXiSSW0QIuKq7yvnoiZopZVkImAcWMW6.a v.TRv8UNE9QyC90e1TqIiKGMQ9jPEUUMWnWgLrwHBzWT1OCinTvGlDG16w2m JjBeqfDLPvw7fWLEVg13OmbJ4l5kauMae5WDd28KmozbAUykh8FTxyFyZddN Sr+ALk77Jog1sZnorKLFdEs4Aw1myDZgt5n6uNqUqNBFPq1W5auAMnXwFaT3 4fIMGff205bUarCpM4zD64JoTGjjM4FQFMMcv9UGZJcT4DwULMhacXW0Dd7z jKbJbbwjKVD3fQUSgtHo3QURNQowcmKxEu8wMWxImI7YnISiml7OILnHpB -----------end_max5_patcher-----------
It works for me if you change the sprintf to something like:
[sprintf symout %s%s.app/Contents/support/%s.txt]
making sure the ".app" bit is included might be what you were missing.
I wasn’t pointing to something like Contents/support but the root/app folder which probably is a nono.
That might have been the problem, generally Contents/support is where you want to bundle all the related bits that go with your app, even making your own subfolders inside "support" is not a problem. If you want to allow users to add their own folders then look at [filepath] which can temporarily add folders to you app’s search path.