Skip to content

on MacOS using osascript instead of tk to avoid crash - #6

Open
bpstudio wants to merge 1 commit into
JRYCodesYT:mainfrom
bpstudio:hotfix/macos-file-handling
Open

on MacOS using osascript instead of tk to avoid crash#6
bpstudio wants to merge 1 commit into
JRYCodesYT:mainfrom
bpstudio:hotfix/macos-file-handling

Conversation

@bpstudio

Copy link
Copy Markdown

Summary

Save, Load, and audio import currently create and destroy a new Tk root on every click. On macOS that conflicts with Pygame/SDL's Cocoa NSApplication singleton, so the file picker hangs or crashes.

This change:

  • Uses the native macOS file dialog via osascript on Darwin
  • Keeps a single persistent Tk root on Windows/Linux instead of create/destroy
  • Routes Save, Load, and audio import through the same helper

On Windows/Linux: Save, Load, and audio import still open the Tk file picker

@GeorgiosPapadakis

Copy link
Copy Markdown

@JRYCodesYT Create a new branch, for example develop, where there you should handle Pull Requests (PRs) and test them. It will make the development more controllable.
The commit looks good btw. Good job @bpstudio !!

@bpstudio

Copy link
Copy Markdown
Author

@JRYCodesYT @GeorgiosPapadakis yes, if there is a develop branch, I can modify the PRs to merge to there.

@GeorgiosPapadakis

Copy link
Copy Markdown

@bpstudio Yes @JRYCodesYT must handle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants