canModalEventBeSentToComponent not working on XP?


#1

I’m trying to make it so that my main window is still draggable when a modal dialog is up. I wrote some code that does this very well on OS X, but when I tested on windows it doesn’t work at all.

Here is what i did.

In my modal, I wrote some code that looks like this:

bool MyModalWindow::canModalEventBeSentToComponent(const Component* targetCompontent){
    if(targetCompontent == &(MainWindow::instance()))
        return true;
    else
        return false;
}

(my main window is a singleton class)

Then in my main window class, I have a mouse dragger and have implemented the MouseListener methods to do dragging.

The mouse listener and dragging code works great when there is nothing modal, but I can’t click on the MainWindow when I have a modal window. It surprised me because it seems like this is exactly what the canModalEventBeSentToComponent is for, but I can’t find any reference in this forum of someone else having trouble with it. Should this work on Windows?

Thanks for any help.


#2

Hmm, it’s supposed to work…


#3

Hmm we’re not seeing it work, but other bugs superceded this thread… if I get a chance to get back to it i’ll try and post more details. Good to know it’s meant to work, and that it shouldn’t be a lost cause. Thanks jules.