No i just want to wait for the user to handle the alert box, i want to
wait for user input before loading the "main program that call listports" that use the midiaccess object that is not ready.
Lets say this is my midiaccess file, how can i list ports after, the
alert box been resolved. So how do i know when the alert box resolved,
where do i call the listports(); or alternatively how do i wait until
alert box resolved?
On Sun, 7 Oct 2018 22:58:12 -0700 (PDT), Jonas Thörnvall wrote:Well weither it is correct or not i tried to move the main(); call into the success method. It was not a good idea. Because for some reason then the alertbox "dialog" "allow block" is no longer ready, but open. Probably the script try to load resources after success that will not be available until i answered the alert box.
No i just want to wait for the user to handle the alert box, i want to
wait for user input before loading the "main program that call listports" that use the midiaccess object that is not ready.
Lets say this is my midiaccess file, how can i list ports after, the
alert box been resolved. So how do i know when the alert box resolved, where do i call the listports(); or alternatively how do i wait until
alert box resolved?
The the arguments passed to the `then()` method is the result of the MIDI access request. It'll succeed if the user allow it, or it'll rejected if otherwise. By the time any is executed, the confirmation box has been responded by user. In your case, call `listPorts()` during or after `success()` is executed.
Well weither it is correct or not i tried to move the main(); call into
the success method. It was not a good idea. Because for some reason then
the alertbox "dialog" "allow block" is no longer ready, but open.
Probably the script try to load resources after success that will not be available until i answered the alert box.
On Tue, 9 Oct 2018 21:50:13 -0700 (PDT), Jonas Thörnvall wrote:I don't think that is the problem as long you have not pushed allow or block resources not available, and the error is not recoverable.
Well weither it is correct or not i tried to move the main(); call into the success method. It was not a good idea. Because for some reason then the alertbox "dialog" "allow block" is no longer ready, but open.
As long as MIDI access hasn't been granted, MIDI resources are not
available.
Probably the script try to load resources after success that will not be available until i answered the alert box.
How come you don't know your own code?
Den torsdag 11 oktober 2018 kl. 15:40:33 UTC+2 skrev JJ:Well sysex on should probably somehow be invoked at later stage, because only needed when dump from what i understand. So then the question become can you change state of it? How, it is not available after midiaccess success?
On Tue, 9 Oct 2018 21:50:13 -0700 (PDT), Jonas Thörnvall wrote:
Well weither it is correct or not i tried to move the main(); call into the success method. It was not a good idea. Because for some reason then the alertbox "dialog" "allow block" is no longer ready, but open.
As long as MIDI access hasn't been granted, MIDI resources are not available.
Probably the script try to load resources after success that will not be available until i answered the alert box.
How come you don't know your own code?
I don't think that is the problem as long you have not pushed allow or block resources not available, and the error is not recoverable.
But i am not as fast clicking as the computer throwing up the window. What i do want is wait call main until alert resolved. But i do not know how to know when alert resolved, how do i know and call main after "block or unblock".
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,007 |
Nodes: | 10 (0 / 10) |
Uptime: | 154:59:32 |
Calls: | 13,142 |
Files: | 186,574 |
D/L today: |
2,531 files (1,331M bytes) |
Messages: | 3,309,258 |