hudPanel's setBecomesKeyOnlyIfNeeded_(true) not working right

Hi,

According to the docs on panels, setBecomesKeyOnlyIfNeeded_(true) should make the the panel unresponsive to everything but clicking in a text field. When I click on the title bar or buttons in the window content, the application becomes frontmost. Is this right or am I doing something wrong?

Edited: I just want the button to become active and not the app.

Thanks,
kel

Does not just clicking on Non Activating in IB do what you want?

When I click on the app always becomes frontmost, but when I click on a button now It works. I might have clicked on a toolbar item. But, anyway after I click on the title bar, the title bar seems to become more active. I need to look into this tomorrow.

Good night,
kel

Hi Shane,

That worked. I changed the non-activating and now it doesn’t come to the front.

Thanks a lot,
kel

Hi Shane,

That’s working well with the non-activating window. I think I’ll try to make it background only and see what happens tomorrow.

Thanks a lot,
kel

I’ve found that the HUD panel becomes the key window just before the title bar background becomes opaque. Now how to make it not key …

I feel like I’m getting close! :slight_smile:

Hi,

Finally found part of the solution. When the panel becomes key, added this:

on windowDidBecomeKey_(aNotification)
        say "is key"
        mainWindow's makeKeyWindow()
end windowDidBecomeKey_

This makes the main window key and the panel title bar remains transparent. Now, I just need to hide the main window somehow and still allow it to become key. Just thought of something. I can make the main window completely transparent and eliminate its title bar.

Getting there! :slight_smile:

If anyone wants a step by step summary I can do it when I have time. I’m still thinking about what to do with the main window. I was thinking about having the main window follow the Hud window so that it will always be behind something. Also, I can change the color of the main window for different sets of function key functions.

It’s working great now.

Edited: the roofers are fixing the roof and it’s really distracting.

Thanks for all the ideas,
kel

Hello.

Actually, a mug shot of the hud window would be nice to see. This may sound cheeky, but you could always send me a copy of your project, which I’ll resolve as good as I can, and not disclose of course. Then I can ask you the questions I need to ask, about what I don’t understand.

Then you should have a basis for the write up. :slight_smile:

Hi McUsr,

Sure, I’ll make a new app without all the extra stuff that was added in experimenting. It’s very simple. The app delegate only has one delegate method and just a few instance methods.

Later,
kel

Hi McUsr,

I sent emailed the zipped file. Hope it sends alright. I added a quick matrix to the HUD panel. I set the alpha 0.5 for the main window temporarily, so that it could be found when run.

You con do anything with it. It’s just a simple project that just needed the right settings.

gl,
kel

Hello.

Thank you! I’ll come back to you with any questions. :slight_smile: