Close the color panel?

Nibbie
Posts: 2
Joined: 2008.12
Post: #1
Howdy

I've got another prob with my settings screen. I made a nib with interface builder and put in a color well. When you click on the colour well the color panel pops up, without me having to put any code in. No worries. I get the color sent back to it when it's selected. All too easy.

However, when you then close my settings window, the colour panel stays until it's manually closed. Is there a way I can grab control of that window and kill it when the other window closes?

Also, I've had some reports that this whole color selection thing is locking up the program. Not sure how, since I can't re-create it myself. But can you think of any reason that would happen?

Thanks once again.

Rob.
Quote this message in a reply
Member
Posts: 28
Joined: 2005.04
Post: #2
Have you checked:

Here
or
Here ?

Without looking at them I would assume that you would have to manually create an instance of a NSColorWell and connect it to the one in IB then manually activate and deactivate or at least manually deactivate it in your code for the closing of the parent window.
Quote this message in a reply
Member
Posts: 168
Joined: 2004.10
Post: #3
This thread should be in idev apps, http://www.idevapps.com .
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2008.12
Post: #4
I actually got it working with a simple:
[[NSColorPanel sharedColorPanel] close];
But it didn't work when I first did it. I changed the color initialization from DeviceRed:etc to CalibratedRed:etc and it did. I dunno what I did wrong, but I'm sure I did something. I usually do. Smile

Also apologies if I did post in the wrong place. The settings screen is for a game, so I wasn't thinking straight on where to ask this question. I'll ask this sort of things on apps in future.

Thanks!

Rob.
Quote this message in a reply
Post Reply