Thread Declaration in a Multiwindow Solution

I’m a bit confused and am hoping someone can point me the way out of the cloud.

I have an app with 2 windows. The content of the second window is generated through processing of the content of the first window having set required controls, usually through radio buttons or sliders. Think of the second window as like an edit decision list.

I now want to ‘play back’ the content of the second window and so replay the processing as recorded, also highlighting the settings of the various controls during playback as these could have changed at different times during recording.

Now as I understand it, this requires a thread else, as experienced, the controls in the first window are updated but the UI does not show their specific settings at any time but only when the method playing back the recording has finished.

But where is the thread and associated methods declared in the first window or the second?

I have looked at thread in the examples projects but am no clearer as in the example, the thread and method are all in the same window.

All assistance appreciated.


Would you elaborate on “Recording” and “Playback”?

The thread can be anywhere. Wherever you find it most convenient.


the app allows the user to perform a number of actions on an item of content. These actions are controlled by various controls, like sliders and radio buttons. The details of the actions are recorded and saved into an external file that can later be reloaded and the actions replayed on the content objects.

Think of recording a song to tape and then replaying it to hear the song but in this case, we also animate the ‘instruments’ during replay.


The thread should be independent of both windows. Check out model-view-controller. Though for Xojo view never made sense to me.

The main window tells the controller “I wanna record”. Then the controller makes both the second window AND the thread. At the end of recording the controller hides the second window and reports back to the main window.

1 Like

I agree with Beatrix. The thread (which could also be a property on a class) could be instantiated at the App level, and both Windows could have a reference to it.

Another route could be to have modes for the first window, such as Record and Playback. When the first window is set to Playback mode, all current control settings are saved (and then restored after Playback is complete or stopped).

Thanks Beatrix and Arthur, I will have further playing to do.