Thanks so much @eric for posting!!! I’d never have known!Hey, you made it on HN https://news.ycombinator.com/item?id=35787119
Thanks so much @eric for posting!!! I’d never have known!Hey, you made it on HN https://news.ycombinator.com/item?id=35787119
I think it’d be best for MacDock to stay the minimalist route.
note I noticed a small redraw issue -- fixed it within the same release so all of the above links still work. Sorry about that to anyone who downloaded it in the first 20 minutes since it was released before it was updated. Links above are still the best ones. No change there.Released - version 1.1
Git repo:
https://github.com/retrospectmike/MacDock
Direct download of the .sit:
https://github.com/retrospectmike/MacDock/releases/download/1.1/MacDock_v1.1.sit
Release notes:
- v1.1 -- 5/8/2023
- No longer keeps After Dark screensavers from triggering when idle
- Reduced CPU utilization by being selective about when to redraw the Dock and its icons
- Added "About MacDock..." dialog
- Reduced RAM requirements to 64k
Also on the git repo I've opened up a variety of "Issues" to capture the various ideas flowing in conversation here -- feel free to open additional ones as you see fit. I can't promise I'll tend to each one but I'll certainly read them all!!
Also - it's touching that it has 150 stars on GitHub. A while back I made a simple little iPhone app and I'm pretty sure it didn't get this level of response! Go figure! '80s computers FTW!!!
Im looking into all those ideas that flowed here! I just needed to roll out an update sooner with what I released yesterday. In particular After Dark compatibility (this was a big deal for me personally as I worry about my old screens) and the About Box needed to work too. I was pleased with the Susan Kare - inspired art :-DNice!
I have a question, why not have an option whether or not to hide other apps when selecting an app on the Dock?
View attachment 12181 View attachment 12183
Fyi for other tinkerers - what did it for me was improving the logic so that MacDock didnt redraw its contents indiscriminately on Null events.Im looking into all those ideas that flowed here! I just needed to roll out an update sooner with what I released yesterday. In particular After Dark compatibility (this was a big deal for me personally as I worry about my old screens) and the About Box needed to work too. I was pleased with the Susan Kare - inspired art :-D
Only call BeginUpdate() and EndUpdate() in the in my update event handler so it's not triggered when the computer is idle.I doubt that drawing per se blocks After Dark. (It would be hard/cumbersome for them to implement that in any event.)
I suspect you are doing something else in your nullEvt processing it is noticing. Are you calling BeginUpdate? (TEIdle, which is what SimpleText is certainly using, does not generate an update event, it simply blinks the caret itself.)
Your checksum idea is what I would have done too, though (I mentioned above somewhere) I would recommend allowing some min interval to elapse between checks. To really let the CPU flow you ideally don’t normally call any traps on a nullEvt. Ensuring it’s been at least 20 ticks or so since the last time should feel fast enough for users.
Thx for confirming the apple event part.There is no easy way to hide any application (or all applications) with a standard toolbox call. You can do it by faking out the Layer Manager and a bunch of hackery, I think.
To get the Finder to show a file’s location you need to use an AppleEvent.
This behavior is inherited in MacDock -- my best guess is that the LaunchApplication(...) process toolbox function I call does this (looks for the option key).
So that's the good news -- that MacDock already behaves like the System 7 app switcher does with respect to holding modifier keys (i.e. the option key).
The bad news- is that there is no easy and obvious way to do something like hide all applications or otherwise change the behavior of that ..
I'd like to at least let you Cmd+Click on an app and have it show you the app's file location in the finder (as modern macOS does when you cmd+click on an app). I'm looking into whether an apple event sent to the finder is needed or if there's a more direct way..
No sadly, the Layer Manager isn’t covered anywhere to my knowledge. It’s in the ROM and OS and you can find the source code for it online but there is no documentation anywhere that I’ve seen, since it was intended to be a private part of the Mac OS. (Applications aren’t supposed to mess with other applications… and more to the point, I think, Apple intended to change the way layers were handled internally in hypothetical future releases.). I even worked at stint at Apple in the ‘90s (as an intern admittedly but still writing classic Mac OS code all day with a giant loose leaf of New Inside Macintosh on my desk) but only know about the Layer Manager because I learned about it from some friendly folks over at 68kmla in 2020.Thx for confirming the apple event part.
And yes - I saw / remembered your post from a while back mentioning the Layer Manager as an in to hack around this.. I couldn't find much on the layer manger -- is it covered at all in Inside Macintosh?
The other way I thought could be an option was if I manually triggered the app switcher menu. It's automatically injected into the app by the Menu Manager -- if I could find some internal functions for it I could maybe call it that-a-ways?
enum {
kAECleanUp = 'fclu',
kAEEject = 'ejct',
kAEEmpty = 'empt',
kAEErase = 'fera',
kAEGestalt = 'gstl',
kAEPutAway = 'ptwy',
kAERebuildDesktopDB = 'rddb',
kAESnooze = 'snoz', // Go to sleep
kAEUpdate = 'fupd'
};
Does anyone know how to find the AppleEvents registry for the Finder?
I'm trying to use AE's to tell the finder to reveal a file (ie bring open the folder containing a program).
From what I can tell, apple had those monthly developer resource magazines and they'd include a CD with apple event registries for the registered programs and presumably the Finder was in there too -- but I can't find it.
Anyway - maybe that's not the best place to look -- but I'm looking for info indicating what apple events the finder will respond to so that I can tell it to do stuff
Hmm -- from what you're saying, I'm not sure it would be useful. I'm looking for some reference that will allow me to build AppleEvents in C that the Finder would understand. Like so that I can build an apple event that tells the finder to open a folder or a reveal the location of an application whose path I get.The Apple Events Registry maps the Apple events to a corresponding English language command. Apple maintains that database. When did they start that database? I am not sure. I will look.
Hmm -- from what you're saying, I'm not sure it would be useful. I'm looking for some reference that will allow me to build AppleEvents in C that the Finder would understand. Like so that I can build an apple event that tells the finder to open a folder or a reveal the location of an application whose path I get.
If that's what you mean - then yes excellent! On the other hand I see AEs are tightly connected with AppleScript scripting which uses a sort of English syntax (like tell application 'Finder' activate). If that's what you mean then that wouldn't be so helpful. I can see the AppleScript dictionary already by opening the Finder's dictionary using the script editor.