Popovers

I was pretty sure someone had already created this, but was unable to find it, so I decided to do it myself… This is written with only declares and native code (no plugins used or required)… Seems to be working on Mac OS X, will work on Windows and Linux next… Once I am done, I will release the source code (please no laughing at how bad it is) to the public domain…

Wohoo! I’ve been needing Popovers for OS X for a while!
Could not thank you enough :wink:
I’ll be waiting.

Yes please, I would like to see that. How are you planning to add content to the popover? I did a very dangerous and nasty hack to use ContainerControls for the view and it shouldn’t be used but it’s here. Without the hack I can only think of manually building the entire view with declares which is too much for me.

I was hoping this would not use your hack doofus.
Let’s hope Shao has come up with a good solution, otherwise I’ll have to re-think a bit…again :wink:

Cool! I’d love to see this on Mac/PC!

Grab the drool mops! Looking forward to this.

Liked! This would be really useful Shao. For displaying certain info on OS X, Apple recommends these NSPopovers. I hope that this will be built into Xojo at some point. <https://xojo.com/issue/25213>

No hacks… It’s really simple (transparent window, child window and z-ordering)… You can design your interface right in Xojo on a window (or a container control) as it is just a window sub-class…

Nice. It looks like a real NSPopover and I thought that was the declares.

doofus, is your EZXML ready. I didn’t see a download button for it and I’m very interested in testing that out for a project I’m working on

Since there isn’t any “Like+++” button I clicked the “Like” button and made this post to show my appreciation :wink:

I, too, would love to see a working class (OSX and Windows, please)!

shao sean, wo shr shao shan mu!

I was just about to look into doing this for an app I’m working on. Are you using a NSPopOver class or using drawing methods to make a window look like a NSPopover window?

Drawing methods… If you want the real thing, use the code posted above by doofus…

Teach me for not reading the full thread before replying to your message! Thanks.

FYI MBS plugins have this already. :slight_smile:

doofus, NSSwitch and FullDrag work great but NSPopover doesn’t. It fails to create an instance of NSPopover.

Program breaks out at… if popoverInstance = nil then break

[quote=27561:@Peter Gattignolo]doofus, NSSwitch and FullDrag work great but NSPopover doesn’t. It fails to create an instance of NSPopover.

Program breaks out at… if popoverInstance = nil then break[/quote]

Same problem here on OSX 10.6.8, but it works on OSX 10.8

Please be aware that NSPopover should NOT be used in any production. It’s just an experiment that I use in little personal utilities where I don’t care if they fup. There’s no guarantee it’s not muxing up Xojos internals or will work in the future. Also I think maybe if there’s more questions about NSPopover to private message me or start a new thread and leave this one for Shao’s work, which is hopefully not that far from release :slight_smile:

Yeah, I’m running OSX 10.6.8. That leaves me out of the fuppin’ loop! :slight_smile: