[SOLVED] Defer your response, workarounds?

1.72K viewsCSS Questions
0

I’m trying to do the following;

When the selected track changes, change the colour of track 1 to yellow

Yes it’s just a test for now.

I’ve tried it several ways but I keep getting the error message

(nanoK Box) There's a problem with 'Action Block 1' in reaction 'Reaction Colour track' (from 'Song - selected track' listener) >>
>> Changes cannot be triggered by notifications. You will need to defer your response.

I’ve written the following Action block to try to work around it:


def set_song_track_color(song):
   song().tracks[0].color = 1676960
self.schedule_message(1000, set_song_track_color(self.song))

But I still get the same error. Why isn’t self.schedule_message working?

Creating a reaction that sets a modifier and then a 2nd reaction that detects the changed modifier and sets the track colour results in the same error.

JohnC Answered question December 23, 2024
Attached Files: