NSTextView with ruler controls in a NSPopover

  • I'm trying to put a text editor into a popover.

    It works, but the positioning of the text controls and rulers is very strange:  http://apptree.net/images/popover.png

    It places them outside of the popover window, even though the textview, its scrollview and the custom view that acts as a container for them all are all fitted inside the popover. The process of assembling the view into the popover isn't directly under my control - I have to pass a NSViewController to the popover when I create it, and that's about all I can do.

    Has anyone got this to work?

    --Graham
  • On 03/07/2012, at 3:32 PM, Graham Cox wrote:

    > I'm trying to put a text editor into a popover.

    Never mind - turns out this is a bad idea anyway. Because the text ruler controls can bring up secondary sheets for the various "Other..." menu items, it all collapses in a heap because NSPopover isn't a NSWindow subclass. The implication seems to be that Apple don't want us to use popovers for anything very sophisticated, like text editing.

    --Graham
previous month july 2012 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