macoslib

Gavin, do you mind if we use your explanation in macoslib? I think the original one is by me, but yours is certainly clearer

Yes, of course, feel free!

Just wanted to say a big THANKYOU!! to the people of MacOSLib

Only needed one small piece of code but MacOslib has saved me a lot of time.

Great work, thanks.

:slight_smile:

If you will be at XDC 2014, I hope you’ll attend my discussion of MacOSLib. If not, well, you’re dead to me, but no pressure… :wink:

Sorry, I won’t be there but first beer is mine, even if virtual :slight_smile:

I’d also like to thank the people who developed MacOSLib. Really neat features. I’d love to make XDC, but I just retired and spent too many hours and days back and forth to Las Vegas where my former company is headquartered. Not going there again if I can help it.

I’m attempting to use the Cocoa TextArea features along with the Cocoa menus provided with MacOSLib and am having limited success. It took about ten minutes to get 90% of it working working, but for the life of me I can’t figure out how to enable the “find” functions and a few other things that remain stubbornly grayed out on the menu, such as “Spelling and Grammar”, substitutions, etc.

I’ve included me.UsesFindPanel=True and me.UsesFindBar=true in the open event of my TextArea as in the demo; I’ve got Cocoa.Initialize in App’s open event and that’s as far as I’ve got in two days of trying. I can’t see how MainMenuBar is used in the demo (all windows use ‘none’) and am wondering if my explicitly using MainMenuBar, which I copied from the demo, is part of the problem.

Can somebody steer me in the right direction, please?

I KNEW this would happen! After beating my head on the floor for a couple of days, I figured it out just an hour after asking for help. If anybody else sees this and is having the same issue, it appears I was on the right track above. The trick is to define your menu under “App”. Define a default window, define your menu, and it all works. Set the menu property for your windows to “none”. I had only seen menus defined under “Window” before and it took me this long to figure out it might not be the only place.

Anyway, even with all my self-inflicted issues, I’ve now got an awesome amount of functionality thanks to Xojo and MacOSLib for just a couple of hours work, if I exclude the time I wasted. Amazing. Again, thanks to all involved. I’ve noticed that at least a couple of the authors are very active in supporting newbies like me, despite what seems to me to be an awful lot of abuse. Just wanted you to know that there a lot of us that are grateful for the help.

Who are the 5 people involve in MacOSLib?

5? When I look at the commits then there are more than 5 …

But I’d say: Sir Charles, Kem Tekinay and TT - many commits also of Vidal van Bergen, Stéphane Mons, and still more.

Notifications and Popovers were exactly what I was looking for.
Now I just have to get them working in my own project file - seems relatively simple to do (said with fingers crossed)
:slight_smile:

Thank you MacOSLib team !

About Popovers in MacOSLib.
What should be added is the possibility to have the Popover show anywhere you want (with x and y properties). Now it only is linked to a control.

The dtplugins have this, so it is possible.

[quote=85581:@Christoph De Vocht]About Popovers in MacOSLib.
What should be added is the possibility to have the Popover show anywhere you want (with x and y properties). Now it only is linked to a control.

The dtplugins have this, so it is possible.[/quote]

Also, like the dtplugins, the multi-platform coder should provide their own solution for other platforms. While this may sound obvious I’ve seen a lot of people realizing at the last minute (that is, right when their first multi-platform betas go out) that they missed this critical piece.

This is one of the reasons I appreciate so much drop-in replacements for native controls/functions. If dtListbox is a drop-in replacement for the native listbox, you can just #iftarget it for OS X and use the native one for other platforms until you code/find a replacement.

It’s also why x-plat solutions like piDogScrollingCanvas are so well regarded.

NSPopOver by design knows only a showrelativetorect method. Did you try creating an invisible NSRect on the desired X, Y positions on your screen and calling the method above relative to this?

Bill Gookin has a very nice Xplat popover solution. See https://forum.xojo.com/7533-popovers-my-solution

Nice! Thanks a lot for mentioning, Michel.
The only problem I have with such additions: Each time I look into another one’s code I find loads of programming techniques I could implement into my much clumsier projects. I’ll never finish them that way! :smiley:

Hmm… tried this but it doesn’t seem to work. Any example for this?

If you had not yet noticed @Kem Tekinay will present a webinar on this on July 8th. http://xojo.com/support/webinar.php

[quote=85630:@Christoph De Vocht]Hmm… tried this but it doesn’t seem to work. Any example for this?
[/quote]
Sorry, no. Was just an idea. I thought one could address the rect via NSGetAttributedItem, but when I try the returned dict is empty. Guess I’ll set my alarm clock for July then :wink:

Alyssa,
Is there a charge for the Webinars?
I am just wondering why I need to register?

Thanks.

Yes, there is a charge. Please send a check for $1,000 US directly to me. If you have attended past webinars, please include a check for each one. Again, made out to me. No need to get Xojo involved in any way. In fact, they pretend that they are free, but this is a ruse. They secretly expect you to pay me, and will be glad you did, even if they deny it when asked.

Trust me…