I'm not sure I entirely agree with this. The point of commodities is to allow global input handlers and programs that run in the background to be stopped/started even though they have no GUI etc.xenic wrote:trixie wrote:Exactly. This is why I added, many months ago, the following note at the beginning of the Commodities Library wiki page:broadblues wrote: A "commodity" that is just a normal app with a popup key is arguably not a true commodity.
In the past, some developers turned their programs into commodities only to provide them with a handy keyboard shortcut to bring up/close their GUI. Please note that such practice is actually a misuse of the commodities framework.
A global keyboard shortcut to popup a running - but hidden - application is exactly the sort of thing commodites.library is designed for.
I'd be interested to know how you define a "true commodity", and why a popup shortcut key is a misuse of the framework.
Whether applications even need such a key is another discussion, but I would argue that in most cases, an AppIcon, application docky or entry into the WB tools menu is the correct thing to do, rather than adding a shortcut to everything that the user is not going to be able to remember and probably won't use. I'd suggest that the note on the commodities.library page should read something like:
Maybe something needs to be added to the Style Guide too.In the past, some developers turned their programs into commodities only to provide them with a handy keyboard shortcut to bring up/close their GUI. Please note that adding a global shortcut to a regular application is not recommended, and instead it is encouraged to utilise visible user interface elements to hide and re-open a program's GUI.
This is because MUI registers everything as a commodity irrespective of what it actually is AFAIK. I'd certainly regard this as an abuse of the commodities framework, certainly on OS4 MUI apps should register with application.library instead, unless they actually need commodities.library functionality. I will try and raise a bug report. Whether it'll be fixed is another matter.It seems like it's way to late for such a restriction. If you check in your Exchange commodity, you will see many major applications like Odyssey, YAM, MUIBase, Directory Opus etc. Considering the already extensive use of Commodity hotkeys, I'd like a way to find out what hotkeys are already in use and being eaten. I had to do trial-and-error testing to find a working hotkey for my commodity.