discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem getting NSPopover to work


From: Sebastian Reitenbach
Subject: problem getting NSPopover to work
Date: Tue, 05 Nov 2024 02:55:07 +0100
User-agent: SOGoMail 5.11.0

Hi,

I'm trying since two days, to create a NSPopover under a NSTextField, when I 
start typing, to show me list of items matching what I type.

However, whenever it tries to show the NSPopover, or more specifically when I 
assigng the ViewController to the popover.contentViewController, I get an 
NSInternalInconsistencyException.

2024-11-04 21:38:40.983 Test-PopoverTest[36432:7926294758536] Problem posting 
<GSNotification: 0x735c115d278> Name: 
NSApplicationDidFinishLaunchingNotification Object: <NSApplication: 
0x736056cf0e8> Info: (null): <NSException: 0x735c1158a28> 
NAME:NSInternalInconsistencyException REASON:Could not load controller 
NSViewController INFO:(null)

Removing all the complexities, I ended up with this little test app here:
https://github.com/buzzdeee/Test-PopoverTest

Just a button, where the NSPopover should appear when the button is pressed.

When I comment out the last line in the applicationDidFinishLaunching: method:
self.popover.contentViewController = popoverContentVC;

then the Exception won't happen, but also the NSPopover not shown.
Do I have to subclass NSViewController and add something special to it? I'm out 
of ideas ;)

Any hint to make the NSPopover show up is highly appreciated.

thanks
Sebastian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]