Closed humdingerb closed 9 months ago
Are you sure you want to create the window in the app's destructor? :)
The right fix should probably be something like what's currently being done in ArgvReceived
, where the args are checked and those that are file entries are saved in a message that is later delivered in ReadyToRun
. So maybe changing RefsReceived
to something like:
void
RadioApp::RefsReceived(BMessage* message)
{
if (mainWindow != NULL)
mainWindow->PostMessage(message);
else
fArgvMessage = new BMessage(*message);
}
I'm not sure right now about the details of copying a message, and maybe it would have to take into account the reception of several messages while the app is not ready, and the parallel playback option.
Are you sure you want to create the window in the app's destructor? :)
Whoopsie daisy... Must've missed the squiggly tilde there... :) I went with your suggestion and had a few more minor changes to make it work with parallel playback and dropping of files. Thanks for the review!
should be superseded by fd0492de2d8b50edc27fad95fb3412d113b0e7a4. Sorry, should have reworked your PR.
No problem, you're on a roll. Are you on vacation ? 😃
Now using a bit Haiku natively on my laptop with Falkon working good enough. StreamRadio needed a bit polishing.
The main window didn't exist yet to receive the RefReceived message. Fixes #58