Hello,
I have been thinking about how to have a live image representation of an app for a dock application and I wanted to try with distributed objects.
But, secondly, I believe there is another, more lightweight, way that can be used to do this aside from DO. The issue I see here is requiring every app to do it this way. If you look in NSApplication you will see a reference to NSIconView and NSIconWindow. These classes display the changing icon in WindowMaker (this is not an endorsement of wmaker, I would like a GS based Dock outside of GWorkspace as well). So, perhaps, it is possible to do this without using Distributed Objects. This is only a suggestion, I like where you're going.
I've implemented a proof of concept dock app that exposes a service where other applications can send their views to be used as icons for a dock. The dock protocol accepts menus that when clicked can trigger callbacks on the original apps. If an app wants to show a badge (with for example the number of notifications) it could draw it itself and then send an update to the dock.
Also, very interesting. Sending the menu items is an awesome idea as well as the badge. There is currently an API in iOS to dot this, I'm not sure if there is one in Cocoa.
Here the code for a basic dock.app, the protocol and a simple client:
Ideally MiniWindows could automatically register to the service..
In the screenshots following you see the client window (bordered) and right below the borderless window of the dock app.
Just a couple of suggestions... good work, keep going. Thanks !!
cheers,
Riccardo