NSColorPanel as sheet?

  • I have an app where it would makes a whole lot of sense to show the
    NSColorPanel as a sheet on a window. There is really no good way to make
    it work as a floater.

    I actually implemented this and it works great except for one minor
    flaw—if you drag the empty space in the toolbar at the top of the
    window, the color panel moves! (This is on Leopard where toolbars are
    always part of window titlebars.) I tried to negate this by calling

        [panel setMovableByWindowBackground:NO];

    but this did not have any effect. I briefly looked for a way to make
    windows completely immobile, and couldn't find it. (Although I am fairly
    positive that the window server can do this...)

    At first I thought that I could kludge around this by implementing the
    delegate methods -windowWillMove and -windowDidMove, and moving the
    window back to where it was, but I am pretty sure this will flicker, and
    it also makes me concerned that I could be headed down a path of
    ugliness and bad news in general. Has anyone experimented with this
    before? Is this just forbidden territory?
  • On Dec 17, 2007, at 11:41 AM, John Stiles wrote:

    > I have an app where it would makes a whole lot of sense to show the
    > NSColorPanel as a sheet on a window. There is really no good way to
    > make it work as a floater.

    Um, didn't you recently say:

    Trying to hijack the [Cocoa control] to do something it's not
    designed to do is bad UI, because it's inconsistent with all other
    apps on the platform. Users who see that [hack] won't expect it to be
    used [that way]....

    Or was someone else e-mailing from your account :-).

    Best,

    __jayson

    Circus Ponies NoteBook - Organization for a Creative Mind
    www.circusponies.com
  • Touché.
    You'll have to trust me on this one.

    Jayson Adams wrote:
    >
    > On Dec 17, 2007, at 11:41 AM, John Stiles wrote:
    >
    >> I have an app where it would makes a whole lot of sense to show the
    >> NSColorPanel as a sheet on a window. There is really no good way to
    >> make it work as a floater.
    >
    > Um, didn't you recently say:
    >
    > /Trying to hijack the [Cocoa control] to do something it's not
    > designed to do is bad UI, because it's inconsistent with all other
    > apps on the platform. Users who see that [hack] won't expect it to be
    > used [that way]..../
    >
    > Or was someone else e-mailing from your account :-).
    >
    > Best,
    >
    >
    > __jayson
    >
    > Circus Ponies NoteBook - Organization for a Creative Mind
    > www.circusponies.com
    >
    >
    >
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today