{"action":"created","issue":{"url":"https://api.github.com/repos/livecode/livecode/issues/3351","labels_url":"https://api.github.com/repos/livecode/livecode/issues/3351/labels{/name}","comments_url":"https://api.github.com/repos/livecode/livecode/issues/3351/comments","events_url":"https://api.github.com/repos/livecode/livecode/issues/3351/events","html_url":"https://github.com/livecode/livecode/pull/3351","id":119197539,"number":3351,"title":"[Bug 15970] Change mechanism for saving in specific stack file formats","user":{"login":"peter-b","id":47528,"avatar_url":"https://avatars.githubusercontent.com/u/47528?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-b","html_url":"https://github.com/peter-b","followers_url":"https://api.github.com/users/peter-b/followers","following_url":"https://api.github.com/users/peter-b/following{/other_user}","gists_url":"https://api.github.com/users/peter-b/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-b/subscriptions","organizations_url":"https://api.github.com/users/peter-b/orgs","repos_url":"https://api.github.com/users/peter-b/repos","events_url":"https://api.github.com/users/peter-b/events{/privacy}","received_events_url":"https://api.github.com/users/peter-b/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/livecode/livecode/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/livecode/livecode/labels/LCS","name":"LCS","color":"bfdadc"},{"url":"https://api.github.com/repos/livecode/livecode/labels/need-tests","name":"need-tests","color":"fad8c7"},{"url":"https://api.github.com/repos/livecode/livecode/labels/WIP","name":"WIP","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/livecode/livecode/milestones/85","html_url":"https://github.com/livecode/livecode/milestones/8.0.0-dp-11","labels_url":"https://api.github.com/repos/livecode/livecode/milestones/85/labels","id":1417835,"number":85,"title":"8.0.0-dp-11","description":"","creator":{"login":"peter-b","id":47528,"avatar_url":"https://avatars.githubusercontent.com/u/47528?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-b","html_url":"https://github.com/peter-b","followers_url":"https://api.github.com/users/peter-b/followers","following_url":"https://api.github.com/users/peter-b/following{/other_user}","gists_url":"https://api.github.com/users/peter-b/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-b/subscriptions","organizations_url":"https://api.github.com/users/peter-b/orgs","repos_url":"https://api.github.com/users/peter-b/repos","events_url":"https://api.github.com/users/peter-b/events{/privacy}","received_events_url":"https://api.github.com/users/peter-b/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":19,"state":"open","created_at":"2015-11-18T13:37:55Z","updated_at":"2015-11-27T13:37:20Z","due_on":"2015-11-26T00:00:00Z","closed_at":null},"comments":15,"created_at":"2015-11-27T13:37:20Z","updated_at":"2015-11-30T10:34:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/livecode/livecode/pulls/3351","html_url":"https://github.com/livecode/livecode/pull/3351","diff_url":"https://github.com/livecode/livecode/pull/3351.diff","patch_url":"https://github.com/livecode/livecode/pull/3351.patch"},"body":"Only the LiveCode \"8.0\" stack format supports widgets.  However, it is otherwise identical to the \"7.0\" format.  By default, the LiveCode 8 `save` command uses the \"8.0\" format for stacks that contain widgets, and the \"7.0\" format otherwise.\r\n\r\n[Bug 15970](http://quality.livecode.com/show_bug.cgi?id=15970) related to the behaviour of the `save` command when `the stackFileVersion` was set to something other than \"8.0\".  The IDE's \"Save As...\" dialog offers the option of which stack file format to use.  When saving a stack that uses widgets, and selecting the \"7.0\" format, the engine would use the \"8.0\" format, regardless -- and this caused confusing errors when attempting to load the resulting file into the LiveCode 7 IDE.\r\n\r\nThis pull request changes the mechanism for choosing the file format version used by the `save` command. It:\r\n\r\n* Refactors all of the object save logic to pass the version to use as a parameter, rather than using the `MCstackfileversion` global static variable.\r\n* Adds a new optional `with format _` clause to the `save` command, which can be used to specify the file format version.  If no `with format _` clause is present, the `save` command now *always* uses the default (latest) version -- `the stackFileVersion` is ignored.\r\n* Marks `the stackFileVersion` as deprecated.  It's still possible to set it and read it, but no code in the engine looks at its value.\r\n\r\n## To Do\r\n\r\n* [ ] Tests\r\n* [ ] Use `the stackFileVersion` iff non-empty\r\n* [ ] Check what happens with invalid version string\r\n* [ ] Decide what to do about forcing data-losing save operation"},"comment":{"url":"https://api.github.com/repos/livecode/livecode/issues/comments/160590883","html_url":"https://github.com/livecode/livecode/pull/3351#issuecomment-160590883","issue_url":"https://api.github.com/repos/livecode/livecode/issues/3351","id":160590883,"user":{"login":"peter-b","id":47528,"avatar_url":"https://avatars.githubusercontent.com/u/47528?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-b","html_url":"https://github.com/peter-b","followers_url":"https://api.github.com/users/peter-b/followers","following_url":"https://api.github.com/users/peter-b/following{/other_user}","gists_url":"https://api.github.com/users/peter-b/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-b/subscriptions","organizations_url":"https://api.github.com/users/peter-b/orgs","repos_url":"https://api.github.com/users/peter-b/repos","events_url":"https://api.github.com/users/peter-b/events{/privacy}","received_events_url":"https://api.github.com/users/peter-b/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T10:34:28Z","updated_at":"2015-11-30T10:34:28Z","body":"@montegoulding That doesn't solve the problem of detecting which versions a stack *can* be saved with (in order to enable the provision of a warning dialog)."}}