Is it possible to show an NSPopover using a custom nib and the dialog command? Or does the NSPopover require some code to show it?
My use case is a command I’m working on for displaying generated documentation, i.e. JavaDoc, for a given symbol. So far I’ve been using a tooltip, It’s working fine but the problem with the tooltip is that it doesn’t support scrolling, when the content gets too long. Ideally I would like something that also is interactable, like clicking on links. I would like to avoid the HTML window/view because I think it’s bit too heavy.
On 21 Aug 2016, at 21:42, Jacob Carlborg wrote:
Is it possible to show an NSPopover using a custom nib and the dialog command? Or does the NSPopover require some code to show it?
- (void)showRelativeToRect:(NSRect)positioningRect ofView:(NSView *)positioningView preferredEdge:(NSRectEdge)preferredEdge
Don’t think you can work that into a nib file.
My use case is a command I’m working on for displaying generated documentation, i.e. JavaDoc, for a given symbol. So far I’ve been using a tooltip, It’s working fine but the problem with the tooltip is that it doesn’t support scrolling, when the content gets too long. Ideally I would like something that also is interactable, like clicking on links. I would like to avoid the HTML window/view because I think it’s bit too heavy.
Scrollable interactive content, presumably with styles? Sounds to me like the HTML view is the proper outlet.
Too heavy I assume is the status bar? Could maybe look into making it possible to hide it from the exposed JavaScript object, or maybe it should be a property of the bundle item (so it doesn’t “flash”).
On 22 aug 2016, at 08:10, Allan Odgaard mailinglist@textmate.org wrote:
- (void)showRelativeToRect:(NSRect)positioningRect ofView:(NSView *)positioningView preferredEdge:(NSRectEdge)preferredEdge
Don’t think you can work that into a nib file.
I suspected that.
Too heavy I assume is the status bar?
No, it’s more that it opens a completely new window (or view) and is, in general, much bigger (taking up more space on the screen). If it’s configured as opening a window, which is the default, it includes the title bar and related controls. In my opinion would an NSPopover be perfect for this, perhaps I’ll create a plugin for this.