receiving notification in a function when a gadget attrib change
Hello again.
I'm searching the way to have a hook function or something, executed when some attribute change in a gadget. I've read about the target thing to automatically link the changes between gadgets, but what I want to do is simply something to be executed when an attrib of a gadget change, to reformat some string...
Thinking about it, as i'm currently developping the gadget, maybe I can just manage "a function pointer to be notified" , as an attrib itself ?
Is there another way ?
For completion, there may be more simple approach:
"If the value of ICA_TARGET is ICTARGET_IDCMP, the icclass object sends an
IDCMP_IDCMPUPDATE IntuiMessage to its window instead of forwarding an
OM_UPDATE message. "
Yes you have unfortunately found the worst part about BOOPSI, and you have found the current ways to make it work. But I'm ther first to admit it is not pretty at all.
In AmigaOS 3.3 we have made it possible to connect a hook to certain "beacons" that objects will be sending out. This will be a 3.3 only solution though, but it makes it much simpler
Hello, good news.
That said, whatI just did is extending a single "modelclass" for my whole App data, and just use it as ICA_TARGET for the gadgets I need to listen. That way it looks very coherent to me architecture-wise.
Example here:
https://github.com/krabobmkd/amigatests/blob/main/src/classwizardtempla…
Online Status
Apparently, you GOT to extend a "modelclass" and have an object as target to receive updates from gadets... oO ...
still investigating...
Looks like it:
I didn't know you could just manage private transient class using just MakeClass/FreeClass with no class name and just superclass, without pubishing it with addClass ... Then just make one "modelclass" with its own dispatcher instance and use it at target. must be it.