Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-implement Surge::UserInteractions::promptError #2671

Closed
baconpaul opened this issue Sep 23, 2020 · 2 comments
Closed

Re-implement Surge::UserInteractions::promptError #2671

baconpaul opened this issue Sep 23, 2020 · 2 comments
Labels
Feature Request New feature request
Milestone

Comments

@baconpaul
Copy link
Collaborator

Right now Surge::UserInteractions::promptError pops up an error dialog.

It's called all over the place - including in non gui code. So the somewhat optimistic default null SurgeGUIEditor reference we added at the very start of the UserINteractions API is not going to help.

Here's an idea though.

Have S::UI::promptError rather the pop an error update an append only per storage instance (so we have to thread a a storage reference through the api) data structure which has a form like

{ std::array<256, pair<error,.errorno>> q, std::atomic_int count; }

so UserInteractions does { q[count] = ( error, errorno ); count++; }. Fine. And of course checks count vs 256 with an atomic swap and so on. You know std::atomic reader writer thingies where it's OK if you are late in the reader.

Then SGE keeps a 'how far have i got' and checks in the idle loop and reacts if it is behind by splatting the next error over the screen.

If you press ok do mycount++ and check with count; if they are the same set storage count ack to zero otherwise show the next message.

That's basically my late night idea on how to chip out more of this API into local code. Probably won't do it for 172 since it's not really in the way like the spawn_miniedit was. But still.

@baconpaul baconpaul added the Feature Request New feature request label Sep 23, 2020
@baconpaul baconpaul added this to the 1.7.n milestone Sep 23, 2020
@mkruselj mkruselj modified the milestones: 1.8.n, 1.9.0 Oct 8, 2020
@mkruselj mkruselj modified the milestones: 1.9.0, Surge XT Jan 24, 2021
@baconpaul baconpaul modified the milestones: Surge XT, 1.9.0 Jan 25, 2021
@baconpaul
Copy link
Collaborator Author

I want to do this one early; it matters a lot for the juce ports too.

@baconpaul
Copy link
Collaborator Author

I'm gonna push this one out of 19. I want to do it a bit differently and am still pondering.

@baconpaul baconpaul modified the milestones: 1.9.0, Surge XT Feb 23, 2021
baconpaul added a commit to baconpaul/surge that referenced this issue Apr 23, 2021
Addresses surge-synthesizer#4337
Closes surge-synthesizer#2671 surge-synthesizer#3435

Refactor/Remove the UserInteractions in favor of JUCE equivalents
and appropirate wrappers

- openURL -> juce::URL.lauch
- showHTML -> surgeguieditor builtin
- Remove openFileInFinder or whatnot for juce::URL(juce::File()).laucnh
- promptInfo removed; single use replaced with an Alert box
- Remove UserInteractions::promptError to be data driven
- promptOKCancel moved to a gui free function which can be replaced and
  is replaced in SGE
- promptFileOpen replaced with juce::FileChooser
- Finally, remove the old files which were no longer used
baconpaul added a commit that referenced this issue Apr 23, 2021
Addresses #4337
Closes #2671 #3435

Refactor/Remove the UserInteractions in favor of JUCE equivalents
and appropirate wrappers

- openURL -> juce::URL.lauch
- showHTML -> surgeguieditor builtin
- Remove openFileInFinder or whatnot for juce::URL(juce::File()).laucnh
- promptInfo removed; single use replaced with an Alert box
- Remove UserInteractions::promptError to be data driven
- promptOKCancel moved to a gui free function which can be replaced and
  is replaced in SGE
- promptFileOpen replaced with juce::FileChooser
- Finally, remove the old files which were no longer used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants