Do I not understand the setLoadingCallback?
-
@aaronventure Thanks!, It's interesting, because it works. But this doesn't
Panel1.setLoadingCallback(function(isPreloading) { if (isPreloading) this.startTimer(50); else this.stopTimer(); });
-
It doesn't seem to work reliably in my compiled project, maybe something to do with it being an expansion...
@Christoph-Hart Can you make this work reliably, either via a broadcaster or the preload callback?
-
@d-healey said in Do I not understand the setLoadingCallback?:
@Christoph-Hart How do we use the broadcaster to show a loading bar? It seems to me that the events trigger after they have completed.
Also
SampleMapLoaded
doesn't work, it needs to beSampleMapChanged
.Bump
-
@d-healey @aaronventure The new broadcaster works great - I'll post a code sample if anyone needs.
-
@clevername27 For a loading bar?
-
@d-healey Good point. I'm wondering if the callback is good enough for the progress bar, and then use the broadcaster to finish it?
-
@Christoph-Hart Could it be the preloading callback isn't working correctly for me because I'm not loading my sample maps from my deferred UI script, instead I'm using a secondary MIDI processor for this?
-
I just found this in the doc on threads, is this why my loading bar isn't working reliably?
With the exception of the latter, all these multithreaded use cases are not synchronised by default (with the rationale of preferring data race conditions over deadlocks and priority inversions). The exception is the user preset load, which locks the scripting thread by default during the operation.
-
@d-healey Have you found any resolution on this?
-
Bump bump @Christoph-Hart What's the use case for
SampleMapLoaded/changed
?