FreeLibs for LiveCode

Find out what's going on with LiveCode (the company), product releases, announcements, and events.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: FreeLibs for LiveCode

Post by shaosean » Tue Dec 12, 2017 3:19 pm

[-hh] wrote:
Tue Dec 12, 2017 12:47 am
You may watch a detailed progress here:
https://github.com/livecode/livecode/milestones
Thanks for that.. Now I'll check that page every day ;-)

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Thu Apr 05, 2018 1:55 am

shaosean wrote:
Tue Dec 12, 2017 3:19 pm
[-hh] wrote:
Tue Dec 12, 2017 12:47 am
You may watch a detailed progress here:
https://github.com/livecode/livecode/milestones
Thanks for that.. Now I'll check that page every day ;-)
Sean would you mind posting your source LCB for FreeLibs, maybe github so I can contribute? We need more code examples of FFI / ObjC in the wild, plus I'd like to mod the Notifications one to add the alert sound parameter (then it would be match my LCS+AppleScript version feature wise)
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: FreeLibs for LiveCode

Post by shaosean » Thu Apr 05, 2018 5:38 am

here it is.. enjoy..
Attachments
UserNotification.lcb.zip
(1.41 KiB) Downloaded 353 times

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Thu Apr 05, 2018 6:51 am

You're awesome, thanks!
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: FreeLibs for LiveCode

Post by shaosean » Thu Apr 05, 2018 7:48 am

You're welcome.. It's in the public domain, so do what you want with it :)

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Thu Apr 05, 2018 10:29 am

OK I added the line for Key:Value pair for soundName, compiled and it works as expected. (Actually not as I was expecting because I had been using notifications through AppleScript, a different process, and so I would always get popup toast regardless of wether or not my stack was in the foreground or background)
One problem now is that it conflicts with the same PostUserNotification handler in net.freelibs.macos.2.0.0.lce, you uploaded the LCB for net.freelibs.usernotification.1.0.0.lce which doesn't have the fullscreen stuff (which is very useful to me, thanks again)

Also, neither of them have the integrated docs or .lcdoc so they show up in the LC dictionary. If you would be so kind as to upload the LCB for the full macOS extensions / net.freelibs.macos.2.0.0.LCB, I'll go through it and insert the documentation and reupload it for anyone else that might be interested.

Here's the one I modified with the added parameter to PostUserNotification, the last parameter can now be the name of a sound in the system like "Sosumi" or left empty for the old default "you've got mail" sound:
UserNotificationWithSound.lcb.zip
(1.72 KiB) Downloaded 345 times
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Thu Apr 05, 2018 4:48 pm

Minor change.
Added a line so you can pass 'empty' (which apparently is not the same as LCB's 'nothing') or the string literal "" as the soundName parameter to have a silent toast popup. Pass anything else that is NOT a sound in the system and you get the default "you've got mail" sound.
Here:
UserNotificationWithSoundParam.lcb.zip
(1.76 KiB) Downloaded 375 times
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Thu Apr 05, 2018 5:37 pm

LC 9 is so great, I'm loving having access to AppKit even though I don't know all that much about ObjectiveC :D
Here's another one I just whipped up in about 2 minutes (most of that was figuring out the binding string).
MiniaturizeAll. It takes no parameters and minimizes all document windows (not palettes, did not test other window types) into the Dock:
MiniaturizeAll.lcb.zip
(1.13 KiB) Downloaded 346 times
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: FreeLibs for LiveCode

Post by shaosean » Thu Apr 05, 2018 11:55 pm

my bad.. here is the all-in-one version you mentioned (your changes have not been added to this, as I just compressed it and uploaded it).. again, it's in the public domain, so feel free to do whatever you want with it..
Attachments
macOS.lcb.zip
(1.72 KiB) Downloaded 327 times

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Fri Apr 06, 2018 2:57 am

Hey that's cool, S.H., and really great that you're putting it in public domain too! If you don't mind I was thinking of just keep adding stuff to your lib and make it huge, releasing it as public domain on gitHub so other people can fork or contribute.

In fact I wrapped another NSApp thing, AppHide and AppUnhide, they're the programatic equivalent of a User selecting "Hide" from an App's Dock Menu (AppHide), and clicking the App's icon in the Dock to bring it to the foreground (AppUnhide), though "AppUnhide" is a little sketchy (I also tried to wrap NSApplicationUnhideWithoutActivation but it kept crashing LiveCode for some reason):
MacTools.lcb.zip
(562 Bytes) Downloaded 324 times
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: FreeLibs for LiveCode

Post by shaosean » Fri Apr 06, 2018 8:49 am

Feel free to put it on GitHub..

I've found that this new LCB stuff is nice, but still lots of things that don't work with doing the Cocoa calls.. I've submitted bug reports and have had most of them fixed, so kudos to the development team..

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Fri Apr 20, 2018 9:02 pm

Everything here so far, combined into one library with SVG icon and dictionary integration:
https://github.com/PaulMcClernan/LiveCo ... macOSTools
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Tue Apr 24, 2018 1:48 am

New feature!
Screen Shot 2018-04-23 at 8.37.05 PM.png
Screen Shot 2018-04-23 at 8.37.05 PM.png (15.97 KiB) Viewed 13616 times
DockTile Badges :-D !

https://github.com/PaulMcClernan/LiveCo ... macOSTools
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: FreeLibs for LiveCode

Post by bogs » Tue Apr 24, 2018 4:54 am

Looks pretty svelte there Paul :!:
Image

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: FreeLibs for LiveCode

Post by PaulDaMacMan » Mon Apr 30, 2018 7:15 pm

bogs wrote:
Tue Apr 24, 2018 4:54 am
Looks pretty svelte there Paul :!:
Thanks.
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

Post Reply

Return to “Announcements”