Search Results

Search found 3 results on 1 pages for 'nspopover'.

Page 1/1 | 1 

  • Cocoa: NSUserNotification appears behind NSPopover

    - by Elbimio
    I have no idea where to even start trying to fix this but maybe someone can point me in the right direction. I have a status item application that shows a popover when clicked, some user interactions produce an NSUserNotification to warn/inform about changes or errors. But when the notification appears it is shown behind the popover, so if they overlay the user can't read what it says. Is there a way to force the notification to appear in front of the popover? Like order the notification to the front. Thanks for the help.

    Read the article

  • Automatically grow document view of NSScrollView using auto layout?

    - by Monolo
    Is there a simple way to get an NSScrollView to adapt to its document view changing size when using autolayout (the Lion feature)? I have tried to call both setNeedsUpdateConstraints: and setNeedsLayout: on the document view, the clip view and the scroll view, without any results. fittingSize of the document view reports the correct size. An NSPopover in conjunction with an NSViewController handles this nicely, with the popover growing and shrinking as needed, and I was hoping to get a similar simple and robust behaviour with the scroll view. I have checked the documentation for scroll views, but they don't seem to be updated to use autolayout. Edited to clarify: The problem I experience is that the document view, which holds subviews, is not re-sized when the subviews change their size, even if they call invalidateIntrinsicContentSize. The contents of the document view are hence clipped to the original size of the document view as they grow. The document view is created in a nib and set as the scroll view's document view in an awakeFromBib method. What I hoped to obtain was that the document view frame would automatically be adjusted to when its fittingSize changes, and the scrollbars updated accordingly. NSPopover does something similar - provided that the subviews of the content controller's view have the constraints set right and various content hugging values are high enough (higher than the hidden popover window's hight constraint priority, for one).

    Read the article

  • NSView only redraws on breakpoint

    - by Jacopo
    I have a custom view inside a NSPopover. It should change according to user input and it does the first time the user interact with it but it fails to redraw the following times. I have tried to put an NSLog inside the -drawRect: method and it doesn't get called during normal execution. When I try to debug and put a breakpoint inside the method it gets called normally and the app works as it should. I explicitly call the view -setNeedsDisplay: method every time I need it to redraw. I don't understand why it should make a difference. Here is the code that update the status of the view. These methods are part of the NSTextField delegate method -textDidChange: and I checked that these get called every time the user type something in the textfield associated with popover. [tokenCloud tokensToHighlight:[NSArray arrayWithObject:completeSuggestionString]]; tokenCloud.tokens = filteredTokens; [tokenCloud setNeedsDisplay:YES]; The views is a series of recessed button. The first line update the status of all the buttons in the popover and the second add or delete buttons. They both work properly because the first time they are called the view is update properly. I have also checked that both the status of the buttons in tokenCloud and its property tokens are updated correctly. The problem is that the NSView subclass, tokenCloud, doesn't redraw so the changes are not reflected in the UI the second time. Here is the draw method of the view: - (void)drawRect:(NSRect)rect { [self recalculateButtonLocations]; NSLog(@"Redrawn"); } Again this method gets called normally every time I update the view if I place a breakpoint in [self recalculateButtonLocations];. If instead I let the app run normally nothing gets logged in the console the second time I update the view. Same thing if I include the NSLog in the recalculateButtonLocations method, nothing gets logged the second time meaning that the method is not called.

    Read the article

1