Troubles in Commodity-land

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
OldFart
Posts: 55
Joined: Tue Jul 12, 2011 2:56 pm
Location: Groningen, Netherlands

Re: Troubles in Commodity-land

Post 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
Sleeping X5000, eagerly awaiting awakening
Dead MicroA1
A1200 in ElBox, c/w Blizzard '040 @ 50MHz + SCSI module, ZIV-board c/w (o.a.) cv64/3d + flickerdoubler + FastATA-ZIV + Lots of SCSI gear (for sale, willing to split)
RaspBerry Pi 2B, 3B & 4B (4Gb)

xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: Troubles in Commodity-land

Post 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.
AmigaOne X1000 with 2GB memory - OS4.1 FE

User avatar
trixie
Posts: 399
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Troubles in Commodity-land

Post 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.
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition

User avatar
Srtest
Posts: 240
Joined: Wed Jun 11, 2014 5:06 pm

Re: Troubles in Commodity-land

Post 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?

chris
Posts: 552
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: Troubles in Commodity-land

Post 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.

User avatar
trixie
Posts: 399
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: Troubles in Commodity-land

Post 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 :-)
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition

Post Reply