Using MessageManagerLock in a DialogWindow


#1

Hi,

I’ve used a DialogWindow to create a preferences panel for my application. In this panel there is one tab which shows data coming in from a piece of external hardware, which is being polled on a thread. It then uses some sliders to show the incoming values.

I’d like to create a MessageManagerLock to lock the application’s thread out while I am updating the sliders, but when I create a MessageManagerLock object, it gets stuck trying to create the lock. I think it might have something to do with the window always being on top. I was thinking that so long as an always on top window is being shown the main application thread won’t relinquish control to another thread. In any case this problem is a bit irritating, because if I don’t create a lock, Juce throws an assertion error when I’m in debug mode.

Does anyone have any suggestions about what I could do to either make this lock work or alternatively how I could disable that particular assertion error?

Thanks!
Greg


#2

Are you using the tip, or an older version? I’m sure my revamp of the MM lock code about a month ago made it cope with stuff like this…?


#3

Hey. Yes, I was using an older version. I just switched to linking against the SVN version, and now the MessageManagerLock is working fine. Thank you for the tip (and also for improving the MessageManagerLock a month ago!).

Greg


#4

By the way Juce is fucking awesome! This thought pops into my head all the time when working with this library…


#5

Ta very much!


#6

that’s a true;
i was not happy by leaving facilities as “signal/slot” in Qt, and other thinds I found fine in this API.
With Juce you really “code less, create more” . :lol:[/code]