Page 7 of 7

Re: Troubles in Commodity-land

Posted: Wed Jan 06, 2016 8:38 pm
by OldFart
@xenic
After a lot of discussion on this topic it appears that you're not going to get an answer unless someone with access to the commodities.library code can determine what qualifiers and codes are acceptable and create a list of them in the autodocs or WIKI.
I'm likewise minded. Maybe I'll have to walk a different path to obtain what I need. ANyway, thank you for your contribution so far. If anything changes I'll duly let our world know.

OldFart

Re: Troubles in Commodity-land

Posted: Wed Jan 06, 2016 9:50 pm
by xenic
OldFart wrote: Well, I did copy the text from the posting into Window's NotePad, saved it to a USB-thingy, took it to the Amiga, copied it back into where it first came from and compiled it. Not one single problem...
The problem may not be with your posting. I tested copying the program with Odyssey, RA-OWB and NetSurf. The hex stuff occurs with copying from Odyssey or OWB but not with NetSurf. I'm not sure where the problem originates but it could be the Amiga browsers.

Re: Troubles in Commodity-land

Posted: Wed Jan 06, 2016 11:35 pm
by trixie
@OldFart
xenic wrote: After a lot of discussion on this topic it appears that you're not going to get an answer unless someone with access to the commodities.library code can determine what qualifiers and codes are acceptable and create a list of them in the autodocs or WIKI.
Try contacting Steven Solie. AFAIK he was the last person who worked on the Commodities Library.

Re: Troubles in Commodity-land

Posted: Fri Jan 15, 2016 3:54 am
by Srtest
trixie wrote:@OldFart

Yeah, sorry about that. Let's focus on the meat :-)


@chris
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
Me too (if it's really the case). Could abuse be any more blatant than this? :-)
I'd be interested to know how you define a "true commodity"
But you have defined a "true commodity" yourself in what you're writing. It's a service program that 1) installs a handler in the input stream to catch input events, and 2) can be activated, deactivated and shut down on demand. As such, a commodity is generally supposed to be designed to react to CXM_COMMAND messages appropriately.

One of my other gripes is that "true applications" that install as commodities only to get a popup key shortcut don't bother to handle CXCMD_DISABLE and CXCMD_ENABLE because, quite logically, normal apps like a browser are not supposed to get activated or deactivated. So a commodities control program (and the user) will see the program as a running commodity but the control will look broken (the app is not responding to activation/deactivation commands). This I think can be confusing.

What I've suggested in a post above is a system that "serves" CX events to applications that have "subscribed" to them. This way an application could receive a global hotkey event without actually registering as a commodity. It would make sense to implement such functionality on the application.library level. For example:
  • an app would do something like REGAPP_PopUpKey, "ctrl a" at registration time;
  • the library's subscription server (a commodity created and managed by the library) would register this event ("rawkey ctrl a") for this particular application;
  • when the given hotkey is pressed, the server commodity will send an APPLIBMT_POPUPKEY message via SendApplicationMsg() to the subscribing application.
As I also said, I've already got something like this working on the BOOPSI level but it'd be much better to go with the application.library. If there's interest in such functionality at all.

And of course I see what you mean when you say that the question is whether "normal applications" should be able to toggle their GUIs in response to a global hotkey.
How is Eastern doing its thing? can its reading of my pics drawer be halted with a combination of keys?

Similary, I like Exchange or such an app that consolidates usage or its supervision to one monitoring place (I dare not say where progs "register" :-) Does the command "status" differ so much from Exchange?

Re: Troubles in Commodity-land

Posted: Tue Jan 19, 2016 12:39 am
by chris
Srtest wrote: Similary, I like Exchange or such an app that consolidates usage or its supervision to one monitoring place (I dare not say where progs "register" :-) Does the command "status" differ so much from Exchange?
"status" only shows running CLI programs, it can't control them (you can use "break" to send a few commands). It isn't really anything like Exchange.

There is a program called AppManager which provides an Exchange-like interface for application.library registered programs. I've also seen screenshots of a new version of Exchange that can manage both Commodities and Applications.

Re: Troubles in Commodity-land

Posted: Tue Jan 19, 2016 10:59 am
by trixie
@chris
I've also seen screenshots of a new version of Exchange that can manage both Commodities and Applications.
And I can tell you that it's still being worked on and is probably not too far away :-)