Thanks for that.. Now I'll check that page every day[-hh] wrote: ↑Tue Dec 12, 2017 12:47 amYou may watch a detailed progress here:
https://github.com/livecode/livecode/milestones
FreeLibs for LiveCode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: FreeLibs for LiveCode
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: FreeLibs for LiveCode
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)shaosean wrote: ↑Tue Dec 12, 2017 3:19 pmThanks for that.. Now I'll check that page every day[-hh] wrote: ↑Tue Dec 12, 2017 12:47 amYou may watch a detailed progress here:
https://github.com/livecode/livecode/milestones
Re: FreeLibs for LiveCode
here it is.. enjoy..
- Attachments
-
- UserNotification.lcb.zip
- (1.41 KiB) Downloaded 370 times
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: FreeLibs for LiveCode
You're awesome, thanks!
Re: FreeLibs for LiveCode
You're welcome.. It's in the public domain, so do what you want with it
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: FreeLibs for LiveCode
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:
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:
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: FreeLibs for LiveCode
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:
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:
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: FreeLibs for LiveCode
LC 9 is so great, I'm loving having access to AppKit even though I don't know all that much about ObjectiveC
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:
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:
Re: FreeLibs for LiveCode
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 342 times
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: FreeLibs for LiveCode
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):
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):
Re: FreeLibs for LiveCode
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..
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..
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: FreeLibs for LiveCode
Everything here so far, combined into one library with SVG icon and dictionary integration:
https://github.com/PaulMcClernan/LiveCo ... macOSTools
https://github.com/PaulMcClernan/LiveCo ... macOSTools
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: FreeLibs for LiveCode
DockTile Badges !Re: FreeLibs for LiveCode
Looks pretty svelte there Paul
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact: